Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node3D local rotation resets when updating global position #92211

Open
jbromberg opened this issue May 21, 2024 · 0 comments · May be fixed by #92172
Open

Node3D local rotation resets when updating global position #92211

jbromberg opened this issue May 21, 2024 · 0 comments · May be fixed by #92172

Comments

@jbromberg
Copy link

jbromberg commented May 21, 2024

Tested versions

Reproducible in 4.3 dev 6 and earlier

System information

Godot v4.3.dev6 - macOS 14.1.2 - Vulkan (Mobile) - integrated Apple M1 Max - Apple M1 Max (10 Threads)

Issue description

Given a Node3D with a local rotation, updating its global position (or calling several other transform methods on it) will end up recomputing the euler angles from the basis instead of retaining the value set by the user.

The following code does not work as expected if the node already has a rotation on another axis:

func _process(delta):
	rotation_degrees.x += 360 * delta
	global_position.x += 1 * delta

I have opened a PR to fix this issue: #92172

Steps to reproduce

Locally rotate any Node3D on more than 1 axis and also apply some other transform methods to it (such as updating its position).

Minimal reproduction project (MRP)

node3d-rotation.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants