Move backwards on a path.

Im creating a menu and im using the path system and it works really well but I have to have 2 paths for every menu element to go forwards and back and its gotten really busy. Is there a way to make the path backwards or is doing 2 paths per element a better idea?

1 Comment

Hi PepperBoi

Unfortunately I don't think you can simply set a negative speed on the Path to follow it backwards. However, no need to manually create two paths. Just create one, then you can clone it and reverse it in your code:

var nodes = path.getNodes(); // this gives you a copy of the array of nodes in the path
var reversedPath = new Path(nodes);


Post a reply
Add Attachment
Submit Reply
Login to Reply