Hi,
I want to move a 2d sprite in the screen.
I have 2 vectors: initial position (A) and end position (B).
I want to move the sprite from A to B in a straight line in T seconds.
¿How do I parametrize the trajectory? I mean, I supose I'll need to keep a "real position" vector value, how do I calculate it in each instant of T?
Thanks
2D Vectors trajectory parametrization
Your problem is a bit ambiguous since you've not told us 'how' you want it to move in a straight line (aka should it move with a constant speed etc :P)
In the simplest case (constant speed) you simply have a velocity of (B-A)/T which remains constant
In the simplest case (constant speed) you simply have a velocity of (B-A)/T which remains constant
Quote:Original post by luca-deltodesco
Your problem is a bit ambiguous since you've not told us 'how' you want it to move in a straight line (aka should it move with a constant speed etc :P)
In the simplest case (constant speed) you simply have a velocity of (B-A)/T which remains constant
thanks. I think its just what I need
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement