- Home /
With enough force, box collider goes through planes.
I made a grenade that rolls too much, so I decided to use a box collider. if an edge of the box hits the ground, it goes right through. And ideas?
Would it help if you use your original collider and increase the (angular-) drag of the rigidbody-component?
Is ground mesh closed? I had same issue when used mesh with holes, as I understand it gives no volume to collider. Also try checking "convex" in mesh collider, if not. If it doesn't helps - replace mesh collider with box collider. Try changing "Collision detection" parameter of rigidbody if grenade moves to fast.
Try to avoid mesh colliders, primitives work better - reinforce as @almostsync says below. $$anonymous$$ake sure that you have dynamic collision if the movement is fast, interpolate or extrapolate too.
Answer by almostsync · Mar 29, 2013 at 05:27 PM
If the wall is thin enough, and the force strong enough, it will pass through.
possible solutions:
reinforce the wall, add an invisible cube collider behind it
if that's not enough, decrease the fixed timestep, but be carefull not to over do it )
if all else fails, handle the "exception" manually in a FixedUpdate()
what about raycasting? could it help?
well don't know never done this stuff
Answer by KoningStoma · Mar 29, 2013 at 04:36 PM
Planes are buggy like that.
If you give it a box collider, it should work better.
Answer by MountDoomTeam · Mar 29, 2013 at 06:06 PM
maybe when an object is close to another object you can switch it into continuous detect mode http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody-collisionDetectionMode.html
Answer by TheDarkVoid · Mar 30, 2013 at 12:26 AM
The reason it is moving through the planes and can move though other collider if because one frame the grenade is on one side of the collider and by the next frame it is already on the otherside, a simple fix is to change the collision detection mode to continuous. You can also mess with the physics calculation settings in project settings.
Your answer
Follow this Question
Related Questions
Set a boolean to true once the wheel collides with two planes? 1 Answer
count how much force is applied 0 Answers
Collision Issue 0 Answers
raycast hit to relative location on collider? 1 Answer
Applying colliders on Bike. 3 Answers