Hi, I really don’t know what I’m doing wrong but the camera just won’t move in my fps
My hierarchy is as follows (Parent at top then child underneath)
Player /
FirstPersonCharacter /
Camera /
Knife
If I have Knife as a child of FirstPersonCharacter, it will do odd things when moving along up/down
I know this has been solved before, but I’ve tried everything. Any and all help is appreciated, thanks.
Weapons should be children of the Camera. Camera should be child of the root (Player).
The root object (PlayerV) rotates on the Y axis (left/right), and the camera (CameraV) should rotate on the X (up/down).
Then you need some code to rotate them based on Input.GetAxis(“Mouse X”) and Input.GetAxis(“Mouse Y”).
Thank you for telling me how the player rotates and the camera looks up/down but I don’t quite understand why I need to use code to make the weapon follow the camera when one of my old projects required no code.
You don’t have to. You just make the weapon a child of the camera and it will follow fine.
The code Stardog mentioned isn’t to get your weapon to follow the camera, it is the most logical process to control the movement via input.