Problems with Vector3.Reflect
Hello, I'm trying to make a game like bowling with balls reflecting from walls. My levels have different shapes other than just rectangular.
My question is about the Vector3.Reflect. It works without a problem when the ball hits on a single surface, but when it hits more than one surface it acts weird. The ball appears to be slowed down but it actually is not. It looks like slowed down because ball's velocity vector and actual moving direction is not the same. Let's say balls velocity vector has become Vector3.right after collision. It's actual direction becomes Vector3.left and I have no idea how this happens. And then, if the ball hits on a surface which gives Vector3.right as the reflect direction, balls appearing velocity becomes normal again. I have tried to use GetContacts instead of GetContact but I couldn't get it done. I'm trying to not use the Bounciness property.
I put a gif to explain the problem: https://media.giphy.com/media/H8JmCi9masZvLj42Zd/giphy.gif
The other problem is when the ball hits a corner. I tried to show it on the Image 1, blue line is the direction of the ball before collision and the red line after collision. There is no way for the ball to follow the red route in real life.
I hope I did explain the problem correctly. Thanks in advance.
Your answer
Follow this Question
Related Questions
Rotating a character with character controller when colliding a wall. 1 Answer
how to calculate the angle between two vectors? 6 Answers
Make camera tracking the view in VR 1 Answer
Trying to Generate Different Random Values for Position of Game Object Instances [C#] 1 Answer
How do I find the rotation of a game object in relation to its grandparent 1 Answer