Moving Platforms & patrol

I did this script for moving platforms to move along a path, but it can be used also for patrol behaviors.


What this is script is doing is basically move the object this script is attached along a path of nodes, and waits in each node during the specified Waiting Time.

Moving Time is the time to go from a node to the next one.

There is 3 modes for patrol:

  • None: the object stops when reaching the target position
  • Loop: the object goes through all the nodes in a loop
  • Ping-Pong: the object is going forward through the path, then in reverse, once it reach the last node




Editing the path is simple. The first node will be always at object position, and there will be a minimum of 2 nodes.

You can add a node by selecting one of them and Shift + Dragging the node.


Shift + Click + Dragging

You can remove the nodes by Ctrl + Clicking on any of them


Control + Click

And finally, you can drag any of the nodes by dragging any node or move all of them in block by moving the parent object


Dragging nodes

Holding Ctrl while dragging a node will snap its position


Dragging nodes + holding Control

Download the scripts for this behavior here

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s