t2d Paths
by Hugo Munoz · in iTorque 2D · 07/06/2010 (7:39 pm) · 1 replies
Hey guys, is there a way to get the current node in a t2dPath ? The reason is because I have an object mounted a LINEAR path and I need to flip it when reaching the last node.
Any thoughts ?
Thanks
About the author
Torque Owner Hugo Munoz
Tinkuq Games
function somePathClass::onReachNode(%this, %object, %node)
{
// if reached the last node, FLIP the object attached to it
if (%node == %this.getNodeCount())
{
%object.setFlip(true, false);
}
}