Hi all. Could anyone explain how I can use setLinearVelocity to push a ball forward? I have the following code which creates and positions a cannon ball ballPlayer in front of a spatial avatarPlayer by 1.8f and above it by 1.8f. In the final line I try to push the ball forward in the direction the ball is facing, but seems the ball is not pushed forward but in some other direction. Any help is greatly appreciated!
ballPlayer = new Geometry(“cannon ball”, sphere);
ballPlayer.setLocalTranslation(avatarPlayer.localToWorld(new Vector3f(0, 0, 1.8f), null).add(0, 1.8f, 0)); // positions the ball relative to the
ball_phy = new RigidBodyControl(1f);
ball_phy.setLinearVelocity(ballPlayer.localToWorld(new Vector3f(0, 0, 1f), null)); // push the ball foward