elasticity

Get help using Construct 2

Post » Sun Nov 18, 2012 5:09 pm

hello community
how can i make an object to follow the mouse but with elasticity.
it would be better if it were possible with the physics behaviour,and making the elasticity with 8 direction movement. sorry if it is a nooby question. (but it gives you a reason to increase your post count )
thanks in advance    
B
20
S
8
G
2
Posts: 122
Reputation: 3,202

Post » Sun Nov 18, 2012 6:10 pm

Ah ... That's really easy , and you don't even need behaviors
Only 1 little event ...

Every Ticks : *NameofTheObjectthatfollowsthemouse* | Set Position
X = Lerp ( *NameofTheObjectthatfollowsthemouse*.X , Mouse.X , 0.5*dt )
Y = Lerp ( *NameofTheObjectthatfollowsthemouse*.Y , Mouse.Y , 0.5*dt )

Cheers
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Mon Nov 19, 2012 1:09 pm

thanks, you have been helping me quite a lot

(note to anyone who reads this)
increase the delta time to make it follow the mouse moreash12212012-11-19 13:14:02
B
20
S
8
G
2
Posts: 122
Reputation: 3,202


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Colorfish, zenox98 and 23 guests