Bounce - Continues Force

Hello,

I’m building a gun that fires a bouncing grenade. It needs to have no gravity change, so basically the Y axis never changes. I’m trying to get it so that when I fire, it will basically just bounce around forever on the X and Z axis.

I’ve added a rigidbody and collider to it. I have also added the ‘Bouncy’ physics effect on it.

When I fire the projectile, I’m just using a simple Instantiate. But I also have a script on the projectile that causes it to actually move forward:

function FixedUpdate(){

	rigidbody.AddForce (transform.TransformDirection (Vector3.forward + Vector3(0,0,1)) * 10);
}

This slightly works. The only problem is that when I fire it, it will travel straight - which is fine. But as soon as it hits something, it will bounce, which is great - BUT then, it will start to curve towards the ‘Z’ axis. It never bounces in a straight direction after that.

Well yes, because you’re adding force on the Z axis… “+ Vector3(0,0,1)) * 10”. What did you expect to happen?