GSC reference › Built-in
AnglesToUp()
Built-in (engine)
Server + client
Math
Returns the up vector corresponding to a set of angles.
Signature
AnglesToUp(<angles>)
Parameters
| Name | Required? | Details |
|---|---|---|
| angles | Required | A set of angles |
Returns
Returns the up vector corresponding to a set of angles.
Example (from Treyarch's docs)
up = AnglesToUp(angles)
Real uses in BO3's scripts
Called 159 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_ambient.csc, line 73
point.up = anglestoup(point.angles); - scripts/zm/_zm.csc, line 1177
upvec = anglestoup(self gettagangles(fxtag)); - scripts/zm/_zm_ai_quadrotor.gsc, line 929
self setvehvelocity(self.velocity + (anglestoup(self.angles) * self.crash_accel)); - scripts/zm/_zm_ai_spiders.csc, line 369
self.var_d5eda36c = playfx(localclientnum, level._effect[str_effect], self.origin, anglestoforward(self.angles), anglestoup(self.angles)); - scripts/zm/_zm_altbody_beast.csc, line 714
up = anglestoup(self.angles);
Related built-ins
- 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
- VectorDot()Returns the dot product of two vectors
- VectortoAngles()Returns a set of angles corresponding to the given vector.
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).