[3D] When adding to the world, player instance shows up somehow rotated

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mogu

Hello, gamedevs. I’m quite new to Godot. My question is: What causes the instance to rotate when it’s added to another scene?
I made a simple Player scene, added it to the World scene, and tweaked it around for a while. Then at some point I noticed that when I add the player instance it shows up more or less tilted along all xyz axis. The instance’s Rotation Degrees are all set to 0. So are the original Player’s scene. The Player instance also has a skewed orange box (what is this?) that contains both the Player and a camera looking at it from above at an angle. I deleted the camera but the instance is still tilted. Where else should I look to fix this?

:bust_in_silhouette: Reply From: DaddyMonster

Children inherit origin, rotation, scale and sheer from their parents. This is done with matrix multiplication (complex linear algebra which I’ll skip) but the nett result is that if you make something a child of something rotated, it will also be rotated even though the child isn’t. This is known as “global” and “local” transforms.

This will propagate down the tree, so you could have a string of children and each transform - position, rotation, scale and sheer - will be passed to the next child.

So just check the parents’ transforms aren’t rotated. Otherwise it could be an animation.