How connect MotionPath with Spatial?


have problem again :(.

Im trying to connect existing Spatial to MotionPath where:

first waypoint is located exacly in the same point where spatial is,

second is random vector3f.

Spatial is jumping, but after jump to path, all motion is ok,

but i dont know how get usable coordinates for first waypoint.

im trying this:



path.addWayPoint(spatial.getWorldTranslation()); // getLocalTranslation()

its a shame that i cant get proper coordinates ;(

in example TestMotionPath

change first waypoint with:


and there will be same strange behavior.

clone the translation. The motionPath keeps the references you give it

1 Like

OMG! it worked!

Thank You :slight_smile: