This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

Camera2D zooming and panning works fine but rotation (set_rot) does not seem to have any effect. Why does this not work as expected?

Additition to original question: When set_rotating(true), camera will rotate according to parent. How could one define a Camera2D which still moves with parent, still is rotateable but rotates independently of parent?

in Engine by (40 points)
edited by

1 Answer

+1 vote

Never tried it, but you can use camera.set_rotating(true) to enable the rotation.

by (29,510 points)

Thanks but this does not work as described in the question since this (kind of) rotates the viewport according to the movement of the camera automatically.

I am wondering if it is a bug that Camera2d ignores set_rot() or something else, i.e. a feature maybe...

Well, I tried to set a rotation script on a test camera and it works. Enabling rotating will make the camera follow set_rot() (including the one from its parent). I did that in Godot 2.1 rc1 btw.

Ok, set_rotating(true) enables it.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.