# [Solved]Moving object at constant speed.

Hello, I have a ball that is bouncing around the scene, I have set it to not be affected by gravity. But when I AddForce pushing it down at 100f, and it bounces against the ground, it goes continuously up at 100f, nothing can stop it except ceiling which it will bounce off and go down at that same constant 100f speed.

Now the problem comes in when I give it an external force that pushes it north-west at 100f aswell, then it goes at a total speed of 200f to north-north-west, while I want it to go north-west at a 100f speed. How can I make it go diagonally and keep a constant speed?

Any suggestions welcome, thanks in advance.

This seems to be a followup to your previous question. If you want an immediate change, assign velocity. Assuming an XY coordinate plane, NW would be (-1,1,0).

``````var nw = Vector3(-1,1,0);

rigidbody.velocity = nw.normalzied * speed;
``````

Note the ‘nomalized’ make the vector have length of 1.0, so when you multiply by ‘speed’ your will get the specified velocity.