In the game I created, there is a ball, and moving objects that can hit it. I want the ball to move when an object hits it. But the ball should move to the right direction, the one which the collision was from. I looked for some answers on the internet, however, most codes were in Java script, and those that were in C# weren’t helpful because it needed a Rigidbody. The ball is a rigidbody, but the objects that may hit it, aren’t. Those are being moved by the CharacterController. The question is how can I detect the collision, to know from what direction it came, and move it to that direction. Thank you.
You can use the relative velocity parameter from oncollisionenter.