Float Physics object towards

Get help using Construct 2

Post » Wed Sep 12, 2012 2:59 pm

Hey

how can i go about making this,
Physics object to float towards another object (dragged by mouse) and hover around it.

Like you drag magnet and nails withing radius float around it

thanks in advance !
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Wed Sep 12, 2012 6:13 pm

Use the Add force towards position action, and set it to the Object.X and Object.Y of the object you are dragging :)
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Wed Sep 12, 2012 7:33 pm

thanks for tip!
though it has one problem, object flies towards point, but then continues on. should not it turn back towards point?
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Thu Sep 13, 2012 8:58 am

in case anyone else wants to do same
http://www.scirra.com/tutorials/369/magnet-effect/page-1

Impulse + Set Angle towards point seems to do the trick
B
24
S
7
G
3
Posts: 138
Reputation: 2,795


Return to How do I....?

Who is online

Users browsing this forum: Magistross, Yahoo [Bot], zatyka and 23 guests