![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
This script moves the object its attached to in the given 2D direction continuously and consistently. Great for simple projectile movement.
Documentation updated 11/13/2024
Private Member Functions | |
void | Update () |
Additional Inherited Members | |
![]() | |
void | HorizontalDirectionChange (bool movingLeft) |
If we want the object to move to left, ensure movementDirection.x is negative. Otherwise, ensure it's positive. | |
void | VerticalDirectionChange (bool movingDown) |
If we want the object to move to down, ensure movementDirection.y is negative. Otherwise, ensure it's positive. | |
![]() | |
Vector2 | movementDirection |
Direction the object should move in. | |
|
private |
\breif Moves the object by (movementDirection.x * Time.deltaTime) every frame, ensuring the object moves at a consistent speed regardless of framerate.