"onMove" is a function that run's when a thing moves:
What it Can Look Like:
Here's a GIF showing the onMove function. When the sphere rolls (moves) it runs a function that sets the time of day. The time of day gets set to the ball's position in the X direction.
How to Access it:
- Select an object, open properties
- Top-left top-level icon selected look to the right panel
- If not expanded, expand "events"
- Select onMove() and the Lua scripting window will appear.
Video Tutorial Overview of the OnMove() Function.
Light Warning: if your onMove function is one that moves(changes position or rotation of your object(the one you're function lives on)), the function may get stuck in a recursive loop. Best to handle moving an object by script from some other object's onMove Function or via the onTick event (called every frame).
Comments
0 comments
Please sign in to leave a comment.