I have a rigidbody character that is always moving forward, and the player controls the left and righ movement. When it hits the walls on the left or right side the script does a reflect:
rigidbody.velocity = Vector3.Reflect(transform.position,collInfo.contacts[0].normal*1.2);`enter code here`
This is working, but I want to limit the object from bouncing backwards, or even directly left or right.
The end result should be if the character hits the right wall it bounces left and sightly forward and vice versa.
Thanks in advance,
Juce