- Home /
How to get the direction of object along axis
Say you want to get the direction an object is moving along an axis, and use it like "If object is moving right/left on X-axis, do something" (C#)
Getting it's transform wouldn't work as that could be a static number, correct? Does this call for some math?
Answer by getyour411 · Sep 20, 2013 at 03:03 AM
Getting it's transform and then getting it again after a frame or two would make for a simple comparison of the position.x
Your answer
Follow this Question
Related Questions
Weird GetAxis behavior 0 Answers
Rotate object so a specific axis faces another object, while also relative to the parent direction 1 Answer
Stop object movement in 1 direction along axis 1 Answer
Flip 2D object on X axis because of a moving target. 1 Answer
How to prevent movement in a specific direction only? -1 Answers