# How to Rotate a vector without keeping the length constant

ATM I have a Vector3 that dictates the velocity of an object in all 3 axis, and Im using this code to rotate the direction that velocity is going based off a variable:

`velocity = Quaternion.AngleAxis(deltaWRAngle, Vector3.up) * velocity;`

Problem with this is that the length is kept constant, which speeds up my object unnecessarily. How would I rotate this to be like: 1,0,0 rotated 45 degrees = 0.5,0,0.5 instead of 0.7,0,0.7?

This makes no sense whatsoever. The velocity vector IS the speed of an object. So rotating that vector and keeping it length the same does not speed up or slow down the object. In your case your object would slow down by almost 30%. So your statement makes no sense. It’s completely unclear what behaviour you expecit. We can extrapolate a mathematical series if you present one. Providing two values can not be extrapolated besides a linear extrapolation. Is that what you want? You really should be more precise what you want instead of stating what you don’t want. Because negating one specific condition gives you infinitely many possibilities if you don’t give a more specific description of how the vector should behave.

Though as already said, keeping a velocity vector a constant length does not change the speed at all.