Garry's Mod Wiki

motionsensor

Functions related to Kinect for Windows usage in GMod.

Kinect feature works only on 32-bit version of the game.

Methods

Vector, Angle, table motionsensor.BuildSkeleton( table translator, Player player, Angle rotation )
This is used internally - although you're able to use it you probably shouldn't. Called to build the skeleton. See Using The Kinect and Kinect developing.
Returns the depth map material.
table motionsensor.GetSkeleton()
Returns players skeletal data if they are using Kinect. See Using The Kinect and Kinect developing.
boolean motionsensor.IsActive()
Return whether a kinect is connected - and active (ie - Start has been called).
boolean motionsensor.IsAvailable()
Returns true if we have detected that there's a kinect connected to the PC
boolean motionsensor.ProcessAngle( table translator, table sensor, Vector pos, Angle ang, table special_vectors, number boneid, table v )
This is used internally - although you're able to use it you probably shouldn't. Used internally by motionsensor. ProcessAnglesTable. See Using The Kinect and Kinect developing.
table motionsensor.ProcessAnglesTable( table translator, table sensor, Vector pos, Angle rotation )
This is used internally - although you're able to use it you probably shouldn't. Used internally by motionsensor. BuildSkeleton. See Using The Kinect and Kinect developing.
table motionsensor.ProcessPositionTable( table translator, table sensor )
This is used internally - although you're able to use it you probably shouldn't. Used internally by motionsensor. BuildSkeleton. See Using The Kinect and Kinect developing.
boolean motionsensor.Start()
This starts access to the kinect sensor. Note that this usually freezes the game for a couple of seconds.
motionsensor.Stop()
Stops the motion capture.