- Home /
Collision detection of fast rigidbodies
Sorry my bad english) I make a blaster gun script for my game. My bullets are rigidbodies with "no use gravity" and "Continuous dynamic" collision detection. They have pretty small renderrer but I set the collider enough big in Z-direction (about 35cm long). I want to launch bullets at least 30m/second and detect collisions with not very large bodies (about 20cm long).
I now that collision detection in Unity is not very good for fast and little bodies (I haven't got "fly through" mistakes only with 15m/second speed bu not much). But I want to make a slow motion time effects in my game, so I need bullets to "fly", not only hitting objects with raycast when player press fire button...
Maybe I need any kind of delay before applying hitting event (e.g. RayCastHit distance to a dot on hitting surface divided on bullet speed), but my target can move and change position... I dont now(( Please tell me how to do. Of course, I understand that my game would'nt be such a cool in this respect as Max Payne))) But I want good collision detections)))
Have you reduced the FixedTimestep from the default 0.02 down to 0.01 or below? Did you take a look at the DontGoThroughThings script on the Wiki?
agorobertbu, thanks you man... if not for you, then I'd have to write the script yourself))) $$anonymous$$y ideas were exactly the same as in this script...
Your answer
Follow this Question
Related Questions
Hand-Held Weapon Collision Detection Not Working (going through walls) 1 Answer
How do I make OnTriggerEnter() respond to just one collider? 2 Answers
Test if BoxCollider is within another BoxCollider? 4 Answers
Find axis of collision 0 Answers
Why Does My Collision Detection Become Inconsistent? 0 Answers