Class PhysicsDirectBodyState2DExtension
- Namespace
- Godot
- Assembly
- GodotSharp.dll
This class extends PhysicsDirectBodyState2D by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server.
Intended for use with GDExtension to create custom implementations of PhysicsDirectBodyState2D.
public class PhysicsDirectBodyState2DExtension : PhysicsDirectBodyState2D, IDisposable
- Inheritance
-
PhysicsDirectBodyState2DExtension
- Implements
- Inherited Members
Constructors
PhysicsDirectBodyState2DExtension()
public PhysicsDirectBodyState2DExtension()
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
_AddConstantCentralForce(Vector2)
Overridable version of AddConstantCentralForce(Vector2?).
public virtual void _AddConstantCentralForce(Vector2 force)
Parameters
force
Vector2
_AddConstantForce(Vector2, Vector2)
Overridable version of AddConstantForce(Vector2, Vector2?).
public virtual void _AddConstantForce(Vector2 force, Vector2 position)
Parameters
_AddConstantTorque(float)
Overridable version of AddConstantTorque(float).
public virtual void _AddConstantTorque(float torque)
Parameters
torque
float
_ApplyCentralForce(Vector2)
Overridable version of ApplyCentralForce(Vector2?).
public virtual void _ApplyCentralForce(Vector2 force)
Parameters
force
Vector2
_ApplyCentralImpulse(Vector2)
Overridable version of ApplyCentralImpulse(Vector2).
public virtual void _ApplyCentralImpulse(Vector2 impulse)
Parameters
impulse
Vector2
_ApplyForce(Vector2, Vector2)
Overridable version of ApplyForce(Vector2, Vector2?).
public virtual void _ApplyForce(Vector2 force, Vector2 position)
Parameters
_ApplyImpulse(Vector2, Vector2)
Overridable version of ApplyImpulse(Vector2, Vector2?).
public virtual void _ApplyImpulse(Vector2 impulse, Vector2 position)
Parameters
_ApplyTorque(float)
Overridable version of ApplyTorque(float).
public virtual void _ApplyTorque(float torque)
Parameters
torque
float
_ApplyTorqueImpulse(float)
Overridable version of ApplyTorqueImpulse(float).
public virtual void _ApplyTorqueImpulse(float impulse)
Parameters
impulse
float
_GetAngularVelocity()
Implement to override the behavior of AngularVelocity and its respective getter.
public virtual float _GetAngularVelocity()
Returns
_GetCenterOfMass()
Implement to override the behavior of CenterOfMass and its respective getter.
public virtual Vector2 _GetCenterOfMass()
Returns
_GetCenterOfMassLocal()
Implement to override the behavior of CenterOfMassLocal and its respective getter.
public virtual Vector2 _GetCenterOfMassLocal()
Returns
_GetConstantForce()
Overridable version of GetConstantForce().
public virtual Vector2 _GetConstantForce()
Returns
_GetConstantTorque()
Overridable version of GetConstantTorque().
public virtual float _GetConstantTorque()
Returns
_GetContactCollider(int)
Overridable version of GetContactCollider(int).
public virtual Rid _GetContactCollider(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactColliderId(int)
Overridable version of GetContactColliderId(int).
public virtual ulong _GetContactColliderId(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactColliderObject(int)
Overridable version of GetContactColliderObject(int).
public virtual GodotObject _GetContactColliderObject(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactColliderPosition(int)
Overridable version of GetContactColliderPosition(int).
public virtual Vector2 _GetContactColliderPosition(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactColliderShape(int)
Overridable version of GetContactColliderShape(int).
public virtual int _GetContactColliderShape(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactColliderVelocityAtPosition(int)
Overridable version of GetContactColliderVelocityAtPosition(int).
public virtual Vector2 _GetContactColliderVelocityAtPosition(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactCount()
Overridable version of GetContactCount().
public virtual int _GetContactCount()
Returns
_GetContactImpulse(int)
Overridable version of GetContactImpulse(int).
public virtual Vector2 _GetContactImpulse(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactLocalNormal(int)
Overridable version of GetContactLocalNormal(int).
public virtual Vector2 _GetContactLocalNormal(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactLocalPosition(int)
Overridable version of GetContactLocalPosition(int).
public virtual Vector2 _GetContactLocalPosition(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactLocalShape(int)
Overridable version of GetContactLocalShape(int).
public virtual int _GetContactLocalShape(int contactIdx)
Parameters
contactIdx
int
Returns
_GetContactLocalVelocityAtPosition(int)
Overridable version of GetContactLocalVelocityAtPosition(int).
public virtual Vector2 _GetContactLocalVelocityAtPosition(int contactIdx)
Parameters
contactIdx
int
Returns
_GetInverseInertia()
Implement to override the behavior of InverseInertia and its respective getter.
public virtual float _GetInverseInertia()
Returns
_GetInverseMass()
Implement to override the behavior of InverseMass and its respective getter.
public virtual float _GetInverseMass()
Returns
_GetLinearVelocity()
Implement to override the behavior of LinearVelocity and its respective getter.
public virtual Vector2 _GetLinearVelocity()
Returns
_GetSpaceState()
Overridable version of GetSpaceState().
public virtual PhysicsDirectSpaceState2D _GetSpaceState()
Returns
_GetStep()
Implement to override the behavior of Step and its respective getter.
public virtual float _GetStep()
Returns
_GetTotalAngularDamp()
Implement to override the behavior of TotalAngularDamp and its respective getter.
public virtual float _GetTotalAngularDamp()
Returns
_GetTotalGravity()
Implement to override the behavior of TotalGravity and its respective getter.
public virtual Vector2 _GetTotalGravity()
Returns
_GetTotalLinearDamp()
Implement to override the behavior of TotalLinearDamp and its respective getter.
public virtual float _GetTotalLinearDamp()
Returns
_GetTransform()
Implement to override the behavior of Transform and its respective getter.
public virtual Transform2D _GetTransform()
Returns
_GetVelocityAtLocalPosition(Vector2)
Overridable version of GetVelocityAtLocalPosition(Vector2).
public virtual Vector2 _GetVelocityAtLocalPosition(Vector2 localPosition)
Parameters
localPosition
Vector2
Returns
_IntegrateForces()
Overridable version of IntegrateForces().
public virtual void _IntegrateForces()
_IsSleeping()
Implement to override the behavior of Sleeping and its respective getter.
public virtual bool _IsSleeping()
Returns
_SetAngularVelocity(float)
Implement to override the behavior of AngularVelocity and its respective setter.
public virtual void _SetAngularVelocity(float velocity)
Parameters
velocity
float
_SetConstantForce(Vector2)
Overridable version of SetConstantForce(Vector2).
public virtual void _SetConstantForce(Vector2 force)
Parameters
force
Vector2
_SetConstantTorque(float)
Overridable version of SetConstantTorque(float).
public virtual void _SetConstantTorque(float torque)
Parameters
torque
float
_SetLinearVelocity(Vector2)
Implement to override the behavior of LinearVelocity and its respective setter.
public virtual void _SetLinearVelocity(Vector2 velocity)
Parameters
velocity
Vector2
_SetSleepState(bool)
Implement to override the behavior of Sleeping and its respective setter.
public virtual void _SetSleepState(bool enabled)
Parameters
enabled
bool
_SetTransform(Transform2D)
Implement to override the behavior of Transform and its respective setter.
public virtual void _SetTransform(Transform2D transform)
Parameters
transform
Transform2D