Hi, I’m playing around with some physics in unity. I’ve created a sphere and I am using the AddForce on it to move it along the x and y axis like so:
void Start () {
position = transform.position;
ball = GetComponent<Rigidbody>();
ball.AddForce(transform.right * xForce);
ball.AddForce(transform.up * yForce);
}
Once the ball hits the ground and starts bouncing, it’s like a force is added to it on the z axis. You can see the behavior here: Screen capture - aa80b05e0129c00dc925d1dc7891715c - Gyazo
I don’t understand why this is happening. I wanted to the ball to bounce straight towards the red cube. Can anyone explain? I don’t know if it matters, but I have 0 dynamic, 0 static, 0 bounciness physic material on my terrain and 0, 0, 0.8 on my ball.