Answer the question
In order to leave comments, you need to log in
How to reflect an object (fully elastic collision) in Unity?
Good day!
I ran into a problem while writing the game (I'm new to this). I want to create a generator that creates small balls and releases them in a certain direction. So, how to make it so that after hitting a collider (a wall, for example), they completely elastically rebound from it (keep their speed) and so that the angle of incidence of these balls is equal to the angle of reflection. I hope the question was formulated correctly.
Answer the question
In order to leave comments, you need to log in
Colliders have a PHYSICAL MATERIAL property.
https://docs.unity3d.com/Manual/class-PhysicMateri...
the material itself has the properties of friction and elasticity.
Don't forget to set the material for both the object and the "wall" it will hit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question