Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
MoveInDirection Class Reference

Detailed Description

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

Author
Stephen Nuttall

Private Member Functions

void Update ()
 

Additional Inherited Members

- Public Member Functions inherited from RudimentaryMovement
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.
 
- Public Attributes inherited from RudimentaryMovement
Vector2 movementDirection
 Direction the object should move in.
 

Member Function Documentation

◆ Update()

void MoveInDirection.Update ( )
private

\breif Moves the object by (movementDirection.x * Time.deltaTime) every frame, ensuring the object moves at a consistent speed regardless of framerate.


The documentation for this class was generated from the following file: