I’m making a brush entity that is supposed to disable gravity when a player or physics prop enters it, but restore it when the entity leaves. It sort of works at the moment; it can disable gravity for physics props that enter it just fine, but it suffers from two major problems; it can’t disable gravity for players, and objects that leave it don’t always have their gravity reset properly.
For players, the brush can successfully grab the physics object and set its’ enable gravity flag (which I have confirmed using physobj:IsGravityEnabled()), but it has no effect. I’m not sure if this is a bug or user error, but I have trouble seeing what I could be doing wrong, especially seeing as it works just fine with physics props and similarly simulated physics objects (like npc_turret_floor).
As for the second issue, various print messages confirm that objects that leave the brush volume are triggering EndTouch and having their gravity set properly (again confirmed with physobj:IsGravityEnabled()). Despite the fact that IsGravityEnabled returns true, they don’t always return to their normal gravity bound behavior and will continue floating until EnableGravity is toggled again.
Are these bugs? I can’t seem to find much information on the use of these functions, but they seem self explanatory, and do sort of work as is. Am I missing something?