How would you go about deflecting bullets ?
Isit changing the rigidbody’s velocity to minus so it goes in the opposite direction
it was shot at?
Any examples or links i can look at
How would you go about deflecting bullets ?
Isit changing the rigidbody’s velocity to minus so it goes in the opposite direction
it was shot at?
Any examples or links i can look at
You will need to re-calculate the transform.forward of the bullet. Look at this page: How to reflect a vector
When you hit a surface, you will have 2 information: transform.forward and Contact Points. Use these 2 information to calculate the reflected orientation of the bullet, then point the bullet to match that particular orientation.
Check the documentation before everything else. Just saw this in the Documentation Vector3.Reflect. No need for manual calculation, just use the function to calculate the reflected Vector.