|
I noticed some new rigidbody flags for collision detection methods in unity 3 so I am playing around with it now but was curious if anyone has tried to make a bullet with the new collision routines. I added a rendertrailer to my bullet sphere and notice that the bullets are ricocheting around the static level mesh as opposed to calling 'OnCollisionEnter' when it ricochets... I guess we still have to do a raycast on a per frame basis? The docs don't really give many details about the implementation of each flag: ContinuousDynamic, Dynamic, and Discrete. So it is still better to mark a bullet as Discrete and raycast old -> new position each frame?
(comments are locked)
|
|
Your walls also have to be set to ContinuousCollisionDetection. Dynamic CCD is for moving objects and CCD is for any objects that they can collide with.
(comments are locked)
|
|
I just started with unity, and don't fully understand the question, but are you trying to stop the bullet or handle a bullet collision ? I wanted to stop projectiles into a wall, so I added a box collider to my wall, then looked for projectile collisions using tags:
HTH
(comments are locked)
|

Yup, I had the same problem: http://answers.unity3d.com/questions/20105/why-is-oncollisionenter-not-always-called. Using triggers instead did not solve my problem.
I basically ditched the new unity 3.0 features and kept with the old methedologies of raycasting old position -> new position and checking the info that gets passed back.