- Home /
how to check collsion without rigibody?
my scripts uses void OnCollisionStay(Collision other) and i don't want to use rigidbody. Because if i want to use OnCollisionStay, i need add rigidbody to my gameObject. So what should i do for my problem? please help me.
If you aren't using rigidbodies for movement, then you are either using a characterController or are moving objects some other way. The fix depends knowing how your movement works.
If it's a CC, they are a pain, but there are lots of threads here about dealing with them.
Answer by Owen-Reynolds · Jan 18, 2013 at 05:49 AM
For things that need a "fake" rigidbody (often to connect hinges to stationary walls,) add one and check isKinematic. That will disable it, but it still counts as one.
Also, if the moving object has a rigidbody, then the other one doesn't need one.
EDIT: OnCollision* will only fire when the physics engine moves a "real" rigidbody -- not if you move them together. But OnTrigger* will fire if at least one object is an RB, even kinematic.
i used rigidbody.is$$anonymous$$inematic but it's not true for my purpose because if i used it, my gameObject go through the collider of my game.
of course, because if it couldn't move through it, it would be a rigidbody.. that's the point.
Your answer
Follow this Question
Related Questions
Checking and destroying a rigidbody? 2 Answers
This might be simple but i'm lost. 4 Answers
Colliding with static model 1 Answer
Problem with damaging game object 1 Answer
How can I remove an object when colliding with an other object? 1 Answer