How can I change the drag on a rigidbody when it collides with anything in the world/map?
I’m currently making a sort of spell working like the staff of magelight from skyrim were the magelight(projectile) stops on collisison!
How can I change the drag on a rigidbody when it collides with anything in the world/map?
I’m currently making a sort of spell working like the staff of magelight from skyrim were the magelight(projectile) stops on collisison!
if (hit){
rigidbody.drag -= 1;
rigidbody.angularDrag -= 1;
}
Some sample code you are using would help to answer this question. My answer is very vague and assumes you already have a hit variable setup and a rigidbody attached to the GameObject from which the script is attached.