Garry's Mod Wiki

PhysObj:UpdateShadow

PhysObj:UpdateShadow( Vector targetPosition, Angle targetAngles, number frameTime )

Description

Unlike PhysObj:SetPos and PhysObj:SetAngles, this allows the movement of a physobj while leaving physics interactions intact.<br> This is used internally by the motion controller of the Gravity Gun , the +use pickup and the Physics Gun, and entities such as the crane.

This is the ideal function to move a physics shadow created with Entity:PhysicsInitShadow or Entity:MakePhysicsObjectAShadow.

Arguments

1 Vector targetPosition
The position we should move to.
2 Angle targetAngles
The angle we should rotate towards.
3 number frameTime
The frame time to use for this movement, can be generally filled with FrameTime or ENTITY:PhysicsSimulate with the deltaTime.

Can be set to 0 when you need to update the physics object just once.

Page Links


Special Pages


Wikis

?

Render Time: 33ms

Session 0
DB GetPage 4
Generate Html 7
SaveChanges 13
Render Body 0
Render Sidebar 7