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

The children of RigidBody2D do not apply scaling during runtime #79929

Closed
Freedomax opened this issue Jul 26, 2023 · 2 comments
Closed

The children of RigidBody2D do not apply scaling during runtime #79929

Freedomax opened this issue Jul 26, 2023 · 2 comments

Comments

@Freedomax
Copy link

Godot version

v4.1.1.stable.official [bd6af8e]

System information

Windows 11- Godot v4.1.1.stable.official [bd6af8e] - Forward+

Issue description

It's fine in the editor, but it's not working correctly when running the game.

issue

Steps to reproduce

Create a new 2D scene, add a RigidBody2D node to root Node2D, add a child node Sprite2D to the RigidBody2D, and then set the Scale of the Node2D's Transform to (2,2).

Minimal reproduction project

issue-scale.zip

@yosoyfreeman
Copy link
Contributor

yosoyfreeman commented Jul 28, 2023

The scale of a RigidBody is intended to be always one. If you scale the RigidBody 2D it sends this Warning:
imagen

if you check the scale when the body is ready and in it's first physic's update the result is exactly the described by the warning: Is 1 when ready and 0.5 while it gets to the first physic's update. Is 0.5 to compensate of the parent distorting its transform to 2.

so, technically is not a bug as is intended behavior.

@Freedomax
Copy link
Author

Alright, now closing this question. I will avoid using scaling in Transform when using physics nodes.

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

No branches or pull requests

3 participants