Child Objects Rotation Problem

I’m having some very strange problem happening to my child objects when I try to rotate their parent. In my scene is a player game object which has a camera parented to it, the camera then has a weaponMount empty parented to it, the the weaponMount has a m4a1 object parented to that… Here ill just remake it, its really confusing to put in words:


The problem is whenever I rotate the camera the m4a1 is supposed to stay parented to the camera and not look like its moving isn’t it??? Well that doesn’t happen the m4a1 kinda rotates but does it really strangely, when the camera is pointing straight up the m4a1 shoots up really high and does the opposite when looking down. It’s just a whole mess and confuses me alot. I’m sure I didn’t mess up settings its just some game objects parented to other game objects. Mabye it has to do with quaternions and euler angles, I don’t know. I need help!!


Why don’t you change the weapon to be parented directly to the player rather than to the camera.


If you’re gun is attached to the camera directly then when the camera moves the gun will move to. If you rotate the camera up then the gun will shoot in the direction it is rotated.

That sounds like that’s what you want. If it’s just rotating too much then yes you’ll have to play with euler angles and figure out the mat to make it go to a suitable angle.