Garry's Mod Wiki

Garry's Mod Wiki

  PhysObj:ComputeShadowControl( table shadowparams )

Description

Allows you to move a PhysObj to a point and angle in 3D space. Works with any PhysObj, not just physics shadows.

Arguments

1 table shadowparams
The parameters for the shadow. See ShadowControlParams structure.

Example

Move a PhysObj to vector 0 0 0 with angles 0 0 0.

function ENT:Initialize() self:StartMotionController() self.ShadowParams = {} end function ENT:PhysicsSimulate( phys, deltatime ) phys:Wake() self.ShadowParams.secondstoarrive = 1 self.ShadowParams.pos = Vector( 0, 0, 0 ) self.ShadowParams.angle = Angle( 0, 0, 0 ) self.ShadowParams.maxangular = 5000 self.ShadowParams.maxangulardamp = 10000 self.ShadowParams.maxspeed = 1000000 self.ShadowParams.maxspeeddamp = 10000 self.ShadowParams.dampfactor = 0.8 self.ShadowParams.teleportdistance = 200 self.ShadowParams.delta = deltatime phys:ComputeShadowControl(self.ShadowParams) end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...