I have a car with the following aspect:


As you can see, colliders are locally static, because they are separated from the original rigidbody component.

Well, as you can suppose, I have a problem, because MonoBehaviours with an OnTrigger(...) or an OnCollision(...) method won't work. (It needs an rigidbody and a collider on the same object)

I thought about Raycasting:




But I have another problem, I have to specify a direction, so, using this: http://answers.unity.com/answers/539155/view.html isn't an option because this is too slow?

What can you suggest me?

  • 2
    \$\begingroup\$ It looks like your colliders are nested in child objects under your Rigidbody, so that means they'll be associated with it as dynamic colliders. OnCollisionEnter and OnTriggerEnter do not require the Collider and Rigidbody to be on the same object. The Rigidbody's object will get collisions/trigger messages for events happening on any of its child colliders. Have you found they're not behaving as expected? \$\endgroup\$
    – DMGregory
    Jul 30, 2018 at 11:44
  • \$\begingroup\$ @DMGregory I think that what he did was that he might have only tested OnCollisionEnter and not OnTriggerEnter. I found that OnTriggerEnter works without RigidBody, but OnCollisionEnter requires the RigidBody even though I'm not sure, but maybe he just didn't test and expects it not to work. I also agree with what you said. \$\endgroup\$
    – Joza100
    Jul 30, 2018 at 13:36


You must log in to answer this question.

Browse other questions tagged .