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

Control node has unexpected movement behavior when rotated #85069

Closed
Mousedotexecutable opened this issue Nov 18, 2023 · 2 comments · Fixed by #89502
Closed

Control node has unexpected movement behavior when rotated #85069

Mousedotexecutable opened this issue Nov 18, 2023 · 2 comments · Fixed by #89502
Milestone

Comments

@Mousedotexecutable
Copy link

Mousedotexecutable commented Nov 18, 2023

Godot version

v4.1.3.stable.official

System information

Fedora Linux 38 (Workstation Edition) - v4.1.3.stable.official - Compatibility (GLES3)

Issue description

The control node has inconsistent movement behavior when it's rotated while having it's global position changed.
For example it might move diagonally, or it has higher speed than expected.

This only happens when it's global position variable gets modified.

It works as expected when rotation_degrees is set to zero or when the position variable gets updated.

The control node is supposed to move similar to how a sprite 2D moves when it's position gets changed.

This also happens with Godot 4.2 RC 1

Steps to reproduce

Make a root scene (This can be any node) and add a Control node. For visualization add a Colored rect as the child of the Control node.

Attach a script, and have it move the Control node's global position downwards by one, every frame.
Code example below this line:


func _physics_process(delta: float) -> void:
	$Control.global_position.y += 1 * delta

Go back to the editor and set the Control node's rotation to 1 in the inspector.

Then run the scene.

Reproduction

Minimal reproduction project

Open master.tscn and run

ControlNodeBugReproduction.zip

@Mousedotexecutable
Copy link
Author

Mousedotexecutable commented Aug 6, 2024

I can't seem to reproduce the bug in version 4.3 rc 2 anymore.

@kleonc
Copy link
Member

kleonc commented Aug 7, 2024

Fixed by #89502 (since v4.3.dev5.official [89f70e9]).

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.

3 participants