Cannot get handgun to follow when I look around

The gun is connected to the player but when I look around it stays in the same place

You has link to editor ?

Oh yeah it is the same one from last time
https://playcanvas.com/editor/scene/896782

Now you have to ‘programmatically’ add the rotation function to the character.

You can do the test of fixing the gun to the camera, I didn’t get to look at the script anymore because it looks like only the camera that has rotation

ok

Try this.

On you code https://playcanvas.com/editor/code/675023?tabs=29435713
Change on line 90 this.camera.setLocalEulerAngles(this.eulers.y, this.eulers.x, 0);
to this.entity.setLocalEulerAngles(this.eulers.y, this.eulers.x, 0);

If you would like I could give you access to the program so you could help out whenever you want

image

What was that supposed to fix?