You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we change anything to do with physics in a physics callback, the engine rightly prints errors: "changing collision rules within a callback is likely to cause crashes!".
What entities in the engine do in callbacks such as VPhysicsCollision (ENT:PhysicsCollide), is that they queue changes to collision rules into g_PostSimulationQueue, either directly or through helper functions like PhysCallbackDamage(...). Right now if we want to, for example, remove an entity on impact via ENT:PhysicsCollide, we have to use a timer - which is horrible and delays everything by a frame.
Additionally, a binding to PhysIsInCallback() would be nice to go in hand with this.
The text was updated successfully, but these errors were encountered:
Please consider this 🙏 many addons have had to implement timers everywhere to do the operations needed post-collision to avoid the console message. This would be extremely useful.
If we change anything to do with physics in a physics callback, the engine rightly prints errors: "changing collision rules within a callback is likely to cause crashes!".
What entities in the engine do in callbacks such as
VPhysicsCollision
(ENT:PhysicsCollide
), is that they queue changes to collision rules intog_PostSimulationQueue
, either directly or through helper functions likePhysCallbackDamage(...)
. Right now if we want to, for example, remove an entity on impact viaENT:PhysicsCollide
, we have to use a timer - which is horrible and delays everything by a frame.Additionally, a binding to
PhysIsInCallback()
would be nice to go in hand with this.The text was updated successfully, but these errors were encountered: