- Home /
Object falling because of gravity and penetrating another object
Object A falling positioned at (0,20,0) and Object B placed at (0,0,0) A is a box collider and B is mesh collider Physics material for both have bounciness 1. Gravity (0,-9.8,0) applied on A, B doesn't uses gravity Now A falls through B and doesn't stop. The collision happens but there is no bouncing happening.
Answer by Owen-Reynolds · Oct 13, 2011 at 11:45 PM
What do you mean "gravity -9.8 applied on A"? Unless you dig into the physics settings, a rigidbody falls w/o you doing anything special. If a script is moving the transform, based on a gravity var, the object is technically micro-teleporting, and will go through anything. Collisions happen when you let the physics engine do the work.
There was no script involved. I realized if in collider I enable trigger, it doesn't collide naturally. Now it works fine.
[Edit in response to Bunny] Collider/trigger is a little confusing for someone with a more gamey background. Unity "triggerBoxes" are commonly known as Bounding Volumes and $$anonymous$$ill Volumes. Colliders in UnReal appear to be nothing like them -- they are a detail setting on the model, without direct control of the geometry such as Unity has/requires. In Torque, colliders are created in the modelling program, also nothing like Bounding Volumes.
Unity seems like it was written by people who think more like programmers. The code for colliders/triggers is 99% the same, so no components with the familiar Bounding Volume name -- ins$$anonymous$$d isTrigger colliders.
@Owen Reynolds : I'm not sure what you're referring to ( i haven't used UnReal yet ;) ). A collider is usually a bounding volume. Every collider in Unity have also a bounds property that gives you the AABB of that collider. Same for Renderer which gives you the AABB of the model-geometry. Even the $$anonymous$$esh itself have it's own bounding box and is not related to the colliders or something else.
Unity strictly seperates the model from it's collider (since a collider is a pure logical thing for collisions). You can also use a meshcollider but use a different mesh as mesh-source for the collider (e.g. a simpler mesh).
The isTrigger option turns the collider into something totally different. It's not a collider for the physics system anymore. It's just an area / volume that can detect other colliders.
Answer by puntawat1412 · Oct 22, 2020 at 05:35 AM
You can use the collision detection by setting it as continuous dynamic to handle faster object. This won't make the object penetrate each other
Your answer
Follow this Question
Related Questions
False collision at the edge of hole when using high gravity value 1 Answer
Collisions are driving me mad! My sanity is fading fast... 3 Answers
Disable a script on collision 2 Answers
Unity2D Collision is bugged 0 Answers
Bounce Back After Collision 0 Answers