Hello,
I have two Sprites (A and B). If player is overlapping Sprite B, then this Sprite should be moved soft to X coordinate of Sprite A. How I can do this with delta time? Thanks for help!
Develop games in your browser. Powerful, performant & highly capable.
Wossi
Basically the movement would go something like this:
Variable speed = XXXX
if A is overlapping B --> set B.x to Self.x+(A.x-Self.x)*speed*dt
also look into "lerp" and rex's plugin "move to"
If I might add another suggestion, litetween..
neverk: Fine, that works! But. how I can reverse this action?
LittleStain - you may... (and a darn fine suggestion it would be)