Tagyourareit
asked on
c# Moving from point A to point B in 3d space
Hello,
I am trying to move from point A(X1,Y1,Z1) to point B(X2,Y2,Z2) and calculate heading as well.
Move from point to point will be done incremental ... i will calculate distance between point in 3d space
and if distance in greater than let say 200 i will move in 2 steps (i hope i have explained it good).
I am coding in c# ... can someone post a function or a code snipped how could this be done in most efficient way?
Thnak you!
I am trying to move from point A(X1,Y1,Z1) to point B(X2,Y2,Z2) and calculate heading as well.
Move from point to point will be done incremental ... i will calculate distance between point in 3d space
and if distance in greater than let say 200 i will move in 2 steps (i hope i have explained it good).
I am coding in c# ... can someone post a function or a code snipped how could this be done in most efficient way?
Thnak you!
ASKER
Hello,
thank you for fast replay.
And what about heading direction? How can i calculate that?
thank you for fast replay.
And what about heading direction? How can i calculate that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I mean as a move direction (which way you are facing at when traveling from one point to another) in degrees.
to move in 2 steps, the first step would be to point C((X1+X2)/2,(Y1+Y2)/2,(Z1+