is it possible for velocity vectors to be added on the players axis?

Hi,
I have been using this line of code to add force to my rigidbody player.

GetComponent.<Rigidbody>().velocity += Vector3.right * sideSpeed;

the only problem is that it only works in one particular direction.
So, say if i was facing north, and i press a key that executes this function. And the player jumps right. If i was to face East, the command would shoot me backwards. Is there a way so that in any direction the player faces they will always jump to their right?
Thanks.

Hi, use transform.right or transform.forward : those are vectors that are expressed in your object local space = always forward or right relative to your object, not absolute values in world space like Vector3.right.

And a reminder: always modify an object physics properties during FixedUpdate :slight_smile: