Thanks for that! I am actually trying to move the Ninja around and test for collisions with another model but I get a NullPointReference if I call
So basically I call the addNinja() method on startup which places the ninjas.get(0) ninja in the middle. I added these line to the addNinja method to enable collision detection:
Right before the ninja.addToWorld method and then if a button is pressed I set apply the direction vector to it but with the checkForCollision call I only get a Null error....
Any idea why?
Thanks for your awesome help.
Code Select
directionVector = ninjas.get(0).getRoot().checkForCollisionEllipsoid(directionVector, ellipsoid, 1);
So basically I call the addNinja() method on startup which places the ninjas.get(0) ninja in the middle. I added these line to the addNinja method to enable collision detection:
Code Select
ninja.getRoot().setCollisionMode(Object3D.COLLISION_CHECK_SELF);
Right before the ninja.addToWorld method and then if a button is pressed I set apply the direction vector to it but with the checkForCollision call I only get a Null error....
Any idea why?
Thanks for your awesome help.