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

Scaled RigidBody should show a node warning in the scene tree as it's something that should not be done #7615

Closed
ghur opened this issue Jan 23, 2017 · 17 comments

Comments

@ghur
Copy link

ghur commented Jan 23, 2017

Bugsquad edit: Repurposed the original issue to handle the suggestion in #7615 (comment)


Operating system or device - Godot version:
v2.1.2

Issue description:
The player model enlarges a lot of times when I run the program than in the edit mode,anyone knows how to solve it?
I have uploaded the screencasts which reflect the problem here:
In the edit mode:
cast
When I run the program:
cast1

And the tscn file here(Level1.tscn/Spatial/Player_1 in the zip file):
question_asked.zip

Steps to reproduce:
just create a new project,unzip the file and open Level1.tscn

Link to minimal example project:

:

question_asked.zip

@ghur ghur changed the title why the player model enlarges a lot when running the program than in the edit mode? The player model enlarges a lot when running the program than in the edit mode? Jan 23, 2017
@ghur ghur changed the title The player model enlarges a lot when running the program than in the edit mode? The player model enlarges a lot when running the program than in the edit mode Jan 23, 2017
@reduz
Copy link
Member

reduz commented Jan 23, 2017 via email

@ghur
Copy link
Author

ghur commented Jan 23, 2017

@reduz Solved,thanks.

@ghur ghur closed this as completed Jan 23, 2017
@reduz
Copy link
Member

reduz commented Jan 23, 2017 via email

@akien-mga
Copy link
Member

akien-mga commented Jan 23, 2017

Kind of duplicate of #5734, but repurposing this issue for adding warnings for scaled RigidBody's (while the other one is about making it possible to actually scale them).

@akien-mga akien-mga reopened this Jan 23, 2017
@akien-mga akien-mga added this to the 3.0 milestone Jan 23, 2017
@akien-mga akien-mga changed the title The player model enlarges a lot when running the program than in the edit mode Scaled RigidBody should show a node warning in the scene tree as it's something that should not be done Jan 23, 2017
@eon-s
Copy link
Contributor

eon-s commented Jan 23, 2017

What about disabling rigid body scaling in the inspector?
And lock the scene editor resize tool, like is done with the pivot tool on 2D.

set_scale could show a warning on the console too for a complete "can't do this" thing.

@bojidar-bg
Copy link
Contributor

@eon-s What if you scale the parent of the rigidbody? The lock-down would get way too expensive if we have to check all children.

@eon-s
Copy link
Contributor

eon-s commented Jan 23, 2017

@bojidar-bg that affects even the the simple warning, but the rigid itself should have the option locked, like the pivot as I mentioned.

@ghost
Copy link

ghost commented Jan 24, 2017

Heya. Felt compelled to add my novice experience to this discussion.

When I first bumped into this, took me a while to figure it out. It wasn't intuitive or consistent with the rest of the Godot node design. Since RigidBody extend other nodes, they imply that it will accept transformations in the same hierarchical manner as everything else.

I understand now that it's not sensible for the physics body to scale, but it would be nice if the transforms were at least coherently forwarded to the collision shapes and child nodes. IE - Scaling up the meshes, sprites, collision shapes, etc. There would be some value in having games objects that are made from physics bodies that could grow and shrink using the existing node semantics.

As it is currently, it seems to be scaling the child nodes in editor, and then you're in for surprises when you run it. They certainly have an awkwardness because of their unclear exceptions.

@reduz
Copy link
Member

reduz commented Jan 24, 2017 via email

@wbrbr
Copy link
Contributor

wbrbr commented Jan 24, 2017

@reduz should RigidBody2D also display a warning ?

@reduz
Copy link
Member

reduz commented Jan 24, 2017 via email

@akien-mga
Copy link
Member

akien-mga commented Jan 24, 2017

I think all types of CollisionShapes should also issue such a warning when resized scaled.

@reduz
Copy link
Member

reduz commented Jan 24, 2017 via email

@akien-mga
Copy link
Member

akien-mga commented Jan 24, 2017

Hm, in my experience scaling a CollisionShape (even uniformly) would cause weird issues in the physics engine. I've always seen people advising not to scale them, but to instead change their size properties.

Edit: Right I wrote "resized" above, I meant "scaled".

@ghur ghur closed this as completed Jan 26, 2017
@akien-mga
Copy link
Member

I reopened this issue, please don't close it.

@akien-mga akien-mga reopened this Jan 26, 2017
@DjPale
Copy link

DjPale commented Apr 28, 2017

Is the common agreement here that we need an Editor Warning on all the collider objects if the scale != (1, 1)? Or is it at the RigidBody-level?

Is this being worked on BTW?

@reduz
Copy link
Member

reduz commented Aug 5, 2017

collider objects should work, the problem is the body itself

@reduz reduz closed this as completed in de9fb90 Aug 5, 2017
akien-mga pushed a commit that referenced this issue Aug 13, 2017
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

7 participants