GSC reference › Built-in
AnglesToRight()
Built-in (engine)
Server + client
Math
Returns the right vector corresponding to a set of angles.
Signature
AnglesToRight(<angles>)
Parameters
| Name | Required? | Details |
|---|---|---|
| angles | Required | A set of angles |
Returns
Returns the right vector corresponding to a set of angles.
Example (from Treyarch's docs)
right = AnglesToRight(angles)
Real uses in BO3's scripts
Called 162 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_electroball_grenade.gsc, line 227
rightvec = vectornormalize(anglestoright(self.angles)); - scripts/zm/_zm_ai_margwa.gsc, line 264
zombie_right = anglestoright(zombie.angles); - scripts/zm/_zm_ai_margwa_elemental.gsc, line 748
right_angle = anglestoright(self.angles); - scripts/zm/_zm_ai_margwa_no_idgun.gsc, line 305
zombie_right = anglestoright(zombie.angles); - scripts/zm/_zm_ai_mechz.gsc, line 781
zombie_right = anglestoright(zombie.angles);
Related built-ins
- IsPlayerWallRunningRight()Returns 1 if the player is currently wall running right
- SetAllowXCamRightStickRotation()Prevent or stop preventing right stick rotation on this xcam (the next playmaincamxcam resets this)
- Int()Casts a floating point number or a string to an integer
- RandomFloatRange()Returns a random floating point number r, where min <= r < max
- DistanceSquared()Returns the squared distance between two points - this is cheaper than the actual distance as it doesn't involve a square root
- RandomInt()Returns a random integer between 0 and max-1 inclusive
- RandomIntRange()Returns a random integer r, where min <= r < max
- AnglesToForward()Returns the forward vector corresponding to a set of angles.
- VectorNormalize()Returns a normalized copy of this vector
- Abs()Returns the absolute value of a float
- Distance2DSquared()Returns the squared distance between two points, ignores height difference.
- Distance()Returns the distance between two points
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).