Server-side code of the cw_grab entity, the invisible physics handle that the Pickup Objects plugin welds a
carried entity to.
The grab moves towards its compute position with shadow control, asks cwPickupObjects:CalculatePosition for a new
position 20 times a second, and drops the entity once the player can no longer hold it.
Summary
Methods
Methods
ENT:Initialize()
server gamemodes/catwork/plugins/pickupobjects/plugin/entities/entities/cw_grab/init.lua:13Sets up the grab as a heavy, non-solid physics object for the shadow controller.
ENT:PhysicsSimulate(physicsObject, deltaTime)
server gamemodes/catwork/plugins/pickupobjects/plugin/entities/entities/cw_grab/init.lua:70Moves the grab towards its compute position with shadow control and keeps the held entity awake.
Parameters
- physicsObject
- deltaTime
ENT:SetComputePosition(position)
server gamemodes/catwork/plugins/pickupobjects/plugin/entities/entities/cw_grab/init.lua:53Sets the position the grab moves towards.
Parameters
- position Vector The target position
ENT:SetPlayer(player)
server gamemodes/catwork/plugins/pickupobjects/plugin/entities/entities/cw_grab/init.lua:59Sets the player holding the grab.
Parameters
- player Player The holding player
ENT:SetTarget(target)
server gamemodes/catwork/plugins/pickupobjects/plugin/entities/entities/cw_grab/init.lua:65Sets the entity the grab is carrying.
Parameters
- target Entity The held entity
ENT:Think()
server gamemodes/catwork/plugins/pickupobjects/plugin/entities/entities/cw_grab/init.lua:37Updates the held entity's position 20 times a second, and drops it or removes the grab once the player can no longer hold it.
ENT:Use(activator, caller)
server gamemodes/catwork/plugins/pickupobjects/plugin/entities/entities/cw_grab/init.lua:31Does nothing; the grab cannot be used.
Parameters
- activator
- caller