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

Scale or Rotate RigidBody should be locked, not just alerted #26890

Closed
Tracked by #45333
rogeriodec opened this issue Mar 11, 2019 · 2 comments
Closed
Tracked by #45333

Scale or Rotate RigidBody should be locked, not just alerted #26890

rogeriodec opened this issue Mar 11, 2019 · 2 comments

Comments

@rogeriodec
Copy link

rogeriodec commented Mar 11, 2019

Godot version:
3.1 RC1

OS/device including version:
Windows 10 x64

Issue description:
My main purpose was to create a 3D board that would interact with the environment.
In this way I created the following structure:

Where Tala is a RigidBody. And to prevent Tala from falling, I switched 'Mode' to 'Kinematic':

Since RigidBody has two children (MeshInstance and CollisionShape), I have manually resized only RigidBody, so MeshInstance and CollisionShape should inherit this RigidBody dimension automatically (CollisionShape and MeshInstance remain untouchable):

So far so good. The camera preview image within the editor and the resulting image rendering match:

Result (F6):

Now I want to rotate RigidBody 20 degrees, so I just enter this line of code:

extends Spatial
func _ready():
	$Tala.rotate_z(deg2rad(20))

Then, pressing F6 I get this distorted image:
👎

After several hours of testing and lots of talk through the DiscordApp, I was alerted that a RigidBody NEVER could be scaled or rotated.

At the same time, that yellow alert triangle next to RigidBody did not appear, as you can see in the first image...

And one day later, I talked more into Discord and someone asked me to change RigidBody (parent) to KinematicBody.
I did this and ... it worked!
I did not change anything in the code, nor in Transform, I just did the "Change Type" for KinematicBody ...
And this is the result (which was expected), but that did not work as long as the parent was RigidBody:
👍


I made sure to detail this well, because I think this is a BUG in RigidBody and not a feature.
It does not make sense to just warn the user that something will give problem.
If this is known to cause problems, this must be LOCKED to the end user.
This is an assumption of good systems engineering.

Still, I think this RigidBody limitation is a BUG.
In short, either fix this bug or block access to resizing and rotating a RigidBody.

I, as a beginner, took a lot to learn how to overcome this limitation of Godot.

I hope newbie users do not suffer that much.


Steps to reproduce:

  1. Open the attached project.
  2. Open Tala.tscn
  3. Press F6 and you will see the distorced result
  4. Change the current RigidBody Tala to KinematicBody.
  5. Press F6 and you will see the correct result.

Minimal reproduction project:
esteira 3.1.zip

@eon-s
Copy link
Contributor

eon-s commented Mar 11, 2019

RigidBodies can be rotated (at runtime only in a way it do not interfere with the physics engine), the scale is the only problem here.

The behavior requested here is the same used on 2D and also Camera node do not allow scaling, so it may be just matter of doing the same with this node.

@akien-mga akien-mga added this to the 3.2 milestone Jan 27, 2020
akien-mga added a commit to akien-mga/godot that referenced this issue Jan 27, 2020
This is still not supported as per godotengine#5734, even though we aim to lift
this limitation eventually.

Fixes godotengine#26890.
@Calinou Calinou changed the title Scale or Rotate RigidBody should be LOCKED, not just alerted Scale or Rotate RigidBody should be locked, not just alerted Jan 27, 2020
@AndreaCatania AndreaCatania self-assigned this Jan 28, 2020
@aaronfranke aaronfranke modified the milestones: 3.2, 3.3 Mar 16, 2021
@aaronfranke aaronfranke modified the milestones: 3.3, 3.4 Apr 21, 2021
@akien-mga akien-mga modified the milestones: 3.4, 3.5 Nov 8, 2021
@akien-mga
Copy link
Member

Duplicate of #5734

@akien-mga akien-mga marked this as a duplicate of #5734 Nov 9, 2021
@akien-mga akien-mga removed this from the 3.5 milestone Nov 9, 2021
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.

5 participants