Collider transform props / debug issue. #729
-
Hi! I'm new to the whole ecosystem. Thank you for all the work and incredible tools I've been finding out. I'm trying to work with colliders: I have a basic player with a rigidbody and a capsule collider inside. Gravity is turned on. The ground also has a collider and I'm testing several colliders that spawn according to the bounding box size of several meshes in the scene. ISSUE: When I set some of the props for either the RigidBody or CuboidCollider scale property for the rigidbody in some cases the colliders stop working and it falls through the ground, or it doesn't collide at all. The debug shows the colliders at the right spot. I've tried several changes, taking the collider out, in, automatic colliders from the rigidbody, etc. Outside of the mesh, inside, etc. Sometimes it works sometimes it doesn't. Usually I can only guarantee collission If I just spawn rigidbody and cuboidcollider without props. It's pretty sporadic but there are several cases where the debug physics shows a collision should stop movement but it still goes through. This following example has me confused and it's the same issue but a specific case.
The scale on the CuboidCollider doesn't affect the box helper that comes with the physics debug flag , but it does cancel the collision when it doesn't coincide in sign with the parent (or when it is missing from the CuboidCollider element). I'm pretty much lost at this point. I have a feeling that the debug mode is not updating correctly with the transform of the CuboidCollider but it's a guess. Versions used:
}, Thank you in advance and also please ask for any context information I might've missed. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
(moved this to the discussions, as it's not a technical problem with the library) Hello! 👋 I am unsure what happens when you apply negative values in the What happens if you simply do |
Beta Was this translation helpful? Give feedback.
-
Here's an example of CuboidColliders being used in conjunction with scales: |
Beta Was this translation helpful? Give feedback.
Unfortunately, there's no "support" for negative scales for colliders, so I cannot speak for how it would work. However, when doing automatic colliders, it calculates the size based on the bounding shape of the mesh, in which case the negative scale of a mesh should not have an effect as the actual scale value won't be used.
If you place it within a container with negative scale however, things will be wrong immediately as the Physics world does not know that your coordinate system is flipped.