Is it possible to have a rigidbody stop all movement when it collides with another object? example: an arrow hitting a target.
thanks for any help
You could probably just use rigidbody.Sleep as long as it’s stuck in static geometry. If the arrow gets hit with some object it will come out of sleep and pop out of the wall, too.
http://unity3d.com/support/documentation/Components/RigidbodySleeping.html
If you wanted it to stick in other rigidbodies, you could instead parent the arrow to the object it hits using its collision info to determine what it hit and setting transform.parent to that object, and then remove its rigidbody component using Destroy(rigidbody) (since you’re not supposed to have a rigidbody as a child of another rigidbody)
To make sure not too many arrows stick around you’d probably also want to destroy the arrow after a while.
I will definitely try the .sleep method. Thanks