Physics

IScenePhysicsEvents

This interface allows you to wrap logic around the physics step. This can be useful when you have an object, or a system, that works closely with the physics system.

public interface IScenePhysicsEvents : ISceneEvent<IScenePhysicsEvents>
{
	/// <summary>
	/// Called before the physics step is run. This is called pretty much
	/// right after FixedUpdate.
	/// </summary>
	void PrePhysicsStep() { }

	/// <summary>
	/// Called after the physics step is run
	/// </summary>
	void PostPhysicsStep() { }
}

Source: Facepunch/sbox-docs (CC-BY-4.0) · updated 2024-10-30. Read it rendered on the official docs.

More in Physics

Community wiki — not affiliated with Facepunch Studios. For the latest and most authoritative information, see the official developer wiki.