# "how to offset vector 3 by an angle unity" Code Answer's

You're definitely familiar with the best coding language C# that developers use to develop their projects and they get all their queries like "how to offset vector 3 by an angle unity" answered properly. Developers are finding an appropriate answer about how to offset vector 3 by an angle unity related to the C# coding language. By visiting this online portal developers get answers concerning C# codes question like how to offset vector 3 by an angle unity. Enter your desired code related query in the search bar and get every piece of information about C# code related question on how to offset vector 3 by an angle unity.

### how to offset vector 3 by an angle unity

By Rich Reindeer on May 19, 2020
`` //Setting up Vector3's for rays Vector3 rayPosition = new Vector3(transform.position.x, headHeight, transform.position.z); Vector3 leftRayRotation = Quaternion.AngleAxis(-fovAngle, transform.up) * transform.forward; Vector3 rightRayRotation = Quaternion.AngleAxis(fovAngle, transform.up) * transform.forward;  //Constructing rays Ray rayCenter = new Ray(rayPosition, transform.forward); Ray rayLeft = new Ray(rayPosition, leftRayRotation); Ray rayRight = new Ray(rayPosition, rightRayRotation);  //(Doing things with rays...)``

0

### how to offset vector 3 by an angle unity

By Rich Reindeer on May 18, 2020
`` Vector3 noAngle = spawn.forward; Quaternion spreadAngle = Quaternion.AngleAxis(-15, new Vector3(0, 1, 0)); Vector3 newVector = spreadAngle * noAngle;  Ray ray = new Ray (spawn.position, newVector);  CastProjectiles(shotDistance, ray);``