GSC reference › Built-in
AngleLerp()
Built-in (engine)
Server + client
Math
Returns <angle> lerped angle value.
Signature
AngleLerp(<from>, <to>, <fraction>)
Parameters
| Name | Required? | Details |
|---|---|---|
| from | Required | An angle. |
| to | Required | An angle. |
| fraction | Required | A float from 0-1. |
Returns
Returns <angle> lerped angle value.
Example (from Treyarch's docs)
180 = AngleLerp( 0, 360, 0.5 )
Real uses in BO3's scripts
Called 1 time in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_ai_thrasher.csc, line 248
var_50a8bb46 = angleclamp180(anglelerp(var_50a8bb46, newyaw, 0.15));
Related built-ins
- LerpFloat()Returns a lerped value between <from> and <to> based on <time>
- VectorLerp()Linear interpolates between two vectors.
- LerpVector()Returns a lerped vector value between <from> and <to> based on <time>
- VisionSetLastStandLerp()Sets players' last stand vision.
- VisionSetNakedLerp()Sets players' naked vision.
- GetControllerPosition()Get current deflection of control, returns values via an array with vector values for "look" and "move" which correspond to those controls.
- LerpViewAngleClamp()Only works if the player is currently linked to another entity and angles aren't locked.
- GetCurrentWeaponSpinLerp()Gets the current weapon spin
- GetVRControllerPosition()Gets the world-space position of the tracked VR controller
- LerpPosition()Interpolate an actor's position, and angles.
- SetCurrentWeaponSpinLerp()Set the current weapon's spin
- VisionSetLerpRatio()Determines if you can see an item.
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).