Skip to main content
deleted 65 characters in body
Source Link
Kromster
  • 10.7k
  • 4
  • 54
  • 67

I was making a 3rd person player controller in Unity. I want to ask a quick question for anyone who has some knowledge in Vectors. Would Vector3 inputDirection = orientation.forward * verticalInput + orientation.right * horizontalInput;

Would

Vector3 inputDirection = orientation.forward * verticalInput + orientation.right * horizontalInput;

be the same as Vector3 inputDirection = new Vector3(horizontalInput, 0.0f, verticalInput)

Vector3 inputDirection = new Vector3(horizontalInput, 0.0f, verticalInput)

? 

I'm pretty new to Vectors, and would like help understanding how or how they aren't the same. Thanks!

I was making a 3rd person player controller in Unity. I want to ask a quick question for anyone who has some knowledge in Vectors. Would Vector3 inputDirection = orientation.forward * verticalInput + orientation.right * horizontalInput; be the same as Vector3 inputDirection = new Vector3(horizontalInput, 0.0f, verticalInput)? I'm pretty new to Vectors, and would like help understanding how or how they aren't the same. Thanks!

I was making a 3rd person player controller in Unity.

Would

Vector3 inputDirection = orientation.forward * verticalInput + orientation.right * horizontalInput;

be the same as

Vector3 inputDirection = new Vector3(horizontalInput, 0.0f, verticalInput)

? 

I'm pretty new to Vectors, and would like help understanding how or how they aren't the same.

Source Link

Help with understanding Vector3 math

I was making a 3rd person player controller in Unity. I want to ask a quick question for anyone who has some knowledge in Vectors. Would Vector3 inputDirection = orientation.forward * verticalInput + orientation.right * horizontalInput; be the same as Vector3 inputDirection = new Vector3(horizontalInput, 0.0f, verticalInput)? I'm pretty new to Vectors, and would like help understanding how or how they aren't the same. Thanks!