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?
Move backwards on a path.
PepperBoi January 5th, 2021
1 Comment
Gio January 10th, 2021
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
nodes.reverse();
var reversedPath = new Path(nodes);
Post a reply
Add Attachment
Submit Reply
Login to Reply