NPCs Control

I’m trying to create some basic AI to get a spatial to follow the player. I’m using the scene composer to place my objects and attach my code to.

How can i access the player model or grab the root node from a control class?

http://hub.jmonkeyengine.org/javadoc/com/jme3/scene/control/AbstractControl.html#getSpatial()

1 Like