minikrampan
Ultra Cool Member
- Reaction score
- 28
Hey, I have 3 points that makes a triangle, I want a unit to slide from point one to two to three to one with a dynamic speed, The further away the points are the faster he slides. If they are closer, he slides slower.
so basicly between every point he should take 2 seconds to reach his target. So how to calculate this?
The unit will use Distance[4] as offset.
ABC is the points.
keep in mind that he slides every 0.01 second so the offset should be a low number.
Hope you understand what i mean im having trouble explaining stuff in english :/
so basicly between every point he should take 2 seconds to reach his target. So how to calculate this?
The unit will use Distance[4] as offset.
Code:
Set Distance[1] = (Distance between ABC[1] and ABC[2])
Set Distance[2] = (Distance between ABC[2] and ABC[3])
Set Distance[3] = (Distance between ABC[3] and ABC[1])
Set Distance[4] = ??
I was thinking somthing like
Set Distance[4] = (((Distance[1] + Distance[2]) + Distance[3]) / 1500.00)
keep in mind that he slides every 0.01 second so the offset should be a low number.
Hope you understand what i mean im having trouble explaining stuff in english :/