Camera rotation as child

Just noticed a bit of a bug:

When attaching a camera as a child of a Model node (as @will saw me messing around in the samba tutorial, ha fun times :wink:) and then rotating the model causes the camera position to be correctly updated but the rotation of the camera view does not update.

One would expect (as the viewport correctly draws) that the camera would keep facing the dancing model.

Also I noticed that rotation by dragging causes some artifacts in the X and Z rotation fields (jumping to 180 and -180). This does not happen when entering the rotation values manually.

See video (1.2mb) here :

Disregard the the camera facing bug, seems to be linked to the camera.js that’s there by default.

The bug with dragging vs typing still counts though !

Yeah, so what you’re seeing here is the difference between what is in the viewport and the running application. Because the camera script is updating the rotation of the camera entity every frame even when you update the camera from the designer. The script then immediately sets the camera rotation back to what it was before.

The extra rotations caused when dragging past 90/-90 is annoying, though the rotation is still correct. I’ll see if we can fix that.