GSC reference › Built-in
GetControllerPosition()
Built-in (engine)
Client
Get current deflection of control, returns values via an array with vector values for "look" and "move" which correspond to those controls. Values are -1 to 1 and represent the given axis on the vector
Signature
GetControllerPosition(<localClientNum>)
Parameters
| Name | Required? | Details |
|---|---|---|
| localClientNum | Required | Client number of the controller you want the position of |
Example (from Treyarch's docs)
pos = self GetControllerPosition() ...
Real uses in BO3's scripts
Called 1 time in the decompiled scripts. A few, zombies first:
- scripts/shared/_character_customization.csc, line 1591
pos = getcontrollerposition(data_lcn);
Related built-ins
- GetVRControllerPosition()Gets the world-space position of the tracked VR controller
- PlaySoundAtPosition()Play the sound alias from a position
- PositionQuery_Source_Navigation()Generate points around <origin>, between <minSearchRadius> and <maxSearchRadius> and within <halfHeight> height difference.
- GetUIModelForController()Returns the UIModel from the controller root.
- PlayRumbleOnPosition()Play a rumble on the given position
- PositionWouldTelefrag()Returns true if the passed in origin would telefrag a player if another player was spawned there.
- UsePosition()Override where the actor should run to.
- SetControllerUIModelValue()Sets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
- PositionQuery_Filter_InClaimedLocation()Check if the locations are inside other sentients claimed locations <entity>.inClaimedLocation.
- PositionQuery_Filter_DistanceToGoal()Calculate the distance to <entity>.goalpos.
- CameraSetPosition()Sets the position of the script camera.
- PositionQuery_Filter_Sight()Sight filter do sight check on each of the positions to a target position, and store the result in pointStruct.visibility (boolean).
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).