garrysmod-requests icon indicating copy to clipboard operation
garrysmod-requests copied to clipboard

Add Entity:MakePhysicsShadowAnObject

Open WinterPhoenix opened this issue 1 year ago • 0 comments

Details

We already have Entity:MakePhysicsObjectAShadow, but there's a need for an inverse version of it.

For example, in a custom player pickup system (like +use pickup), we want to be able to use MakePhysicsObjectAShadow on an entity on pickup, so we can use PhysObj:UpdateShadow to update the position and rotation while the player moves it around. Then, Entity:MakePhysicsShadowAnObject to restore the physics object's original properties once the player drops it.

Recreating the physics object is furthermore not an option since it breaks constraints.

WinterPhoenix avatar Aug 31 '24 18:08 WinterPhoenix