garrysmod-requests
garrysmod-requests copied to clipboard
Add Entity:MakePhysicsShadowAnObject
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.