hi so I’ve been searching for the answer to this problem for about 2 hours, I have this
public Vector3 speed = new Vector3(10, 10, 10);
public Vector3 direction = new Vector3(-1, 0, 0);
void Update(){
if(Input.GetKey(KeyCode.T) && levitating == true){
movement = new Vector3(
speed.x * direction.x,
speed.y * direction.y,
speed.z * direction.z);
levitating = false;
}
when I press “T”, the projectile instantiate from another script attached to my player , but the projectile always goes straight to the y axis, is there a way to make it move to a line from my player