Fps hands not rotating properly

I have a model of an arm and it basically follows the camera, so its location matches the camera’s location. but the problem is that even though the location is the same, the rotation is not. when i do hands.setLocalRotation(cam.getRotation()); i cant see the hands anymore. how do i fix this?

[java]

Are you talking about first person?

<a href=‘https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:making_the_camera_follow_a_character’>https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:making_the_camera_follow_a_character</a>

[/java]

probably the zero rotation is facing backwards or something. multiply a constant quaternion that fixes it. it might be hard to tell how much it’s off while it’s attached to the camera.

@kidneytrader how would i do that and do i apply it to the hands spatial?

hands.setLocalRotation(cam.getRotation().mult(something));

:roll:

glaucomardano said:

[java]

Are you talking about first person?

&lt;a href=‘https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:making_the_camera_follow_a_character’&gt;https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:making_the_camera_follow_a_character&amp;lt;/a&amp;gt;

[/java]



Sorry, that link is about "Making the Camera Follow a 3rd-Person Character", not first person :roll:.

i still cant get the hands to rotate properly, am i supposed to just guess random numbers for the hands.setLocalRotation(cam.getRotation().mult()) ?

either your close frustum is too far or your hands are not rotated correctly, like you suggested. if it’s the latter you should multiply by the quaternion representing the correction needed to make the hands face the same way as the camera. I don’t know what this is but you can find it by attaching it to a node that you can see and finding the difference in forward directions, or adding both the camera and the arms to one node which you rotate using lookAt().