Hello Guys so ive been learning Jmonkey for a while and just practicing with the tutorials.So what ive done is added an Ak-47 to the FPS cam.the gun is good,
but i have two problems
- i used the following code to move the gun with the player
[java]
if (down)
{ walkDirection.addLocal(camDir.negate());
Weapon.setLocalTranslation(cam.getLocation().x+1.5f, cam.getLocation().y-2,cam.getLocation().z);
}
[/java]
it is working but it causes flickering of gun while i move.
2)when i move my mouse (i.e) turn the player the gun is not turning it still remains in the same axis.Please help with these also if there is a better way to stick the gun with the player please tell.