Hi,
I have 2 cubes, both with box colliders. One of them has rigidbody. If the rigidbodied cube moves, a collision is detected. But if the rigidbody is stationary and the other object moves, no collision is detected.
Can somebody explain what’s happening?
Thank you.
Objects with colliders are not controlled by physics if they don’t have a rigidbody. It’s that simple. It works the other way because thats how you create most static colliders, a collider without a rigidbody, and a moving object with a rigidbody.
Thank you.
Any suggestions on how to detect a collision if a moving non rigidbody collides with a static collider?
In order to detect collisions, both gameObject must have collider, and at least one gameObject must have a rigidbody (whether it is kinematic or not do not matter).
And if I guess well, in order to detect triggers between two gameObject, the first one must have at least a trigger collider, and the second one must have at least a rigidbody and a collider (is kinematic or is trigger do not matter).
See there : http://unity3d.com/support/documentation/Manual/Physics.html
Edit : I think I have understood some things. Thanx you Peter !
Unfortunately, you either have to write your own collision detection or add a rigidbody. Although, the most of the time,a static collider is static i.e. doesn’t move, so what are you makin that has a moving static collider?