For this code:
GetComponent().velocity.x = 15;
I get thid error:
Unexpected >.
Thanks
For this code:
GetComponent().velocity.x = 15;
I get thid error:
Unexpected >.
Thanks
I can see two issues.
GetComponent<RigidBody>().velocity
Vector3 origVelocity = GetComponent<RigidBody>().velocity; GetComponent<RigidBody>().velocity = new Vector3(15, origVelocity.y, origVelocity.z);