- Home /
Collision Detection with a Rigid Player Object
Hello everyone,
I am fairly new to unity, so this might be a stupid question. I am using some sample brick breaker project I found, and I started messing with how the paddle moved, so I set it to rigid body, as well as the walls around, figuring it would stop me from passing through, which it kind of does, but it also doesn't. It shows my block moving in and out of the wall, and sometimes the block will pass right through it. I didn't use any scripts for this, just the rigid body options, made the walls not be moveable or rotatable, and did the same for the block. Any ideas on how to fix the partial passing walls? Thanks in advance!
WWaldo
Answer by Aubrey Hesselgren · Apr 21, 2011 at 02:59 PM
Try setting the rigid body's "Collision Detection" option to "continuous".
This will stop the object "tunneling" (i.e. large phyiscal steps during a frame may result in "stepping over" ) vs. static objects, but is slightly more expensive. For a breakout game, you'll be fine, though.
Really, I don't understand where "discrete" rigidbody collision is actually useful, but that's just me.
I have been working on a game with physical bullets and found that the combination of static, mesh collider walls and box collider fast movers set to continuousDynamic is the most reliable option. I have tested them with velocities of 2000 m/s which is above any conventional gun as far as i know.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Detect Collision Between Object and Box Collider 1 Answer
Advice for Intersecting Colliders 0 Answers
Waypoints using a Switch... 2 Answers
Combine common surfaces 1 Answer