|
| | CharacterBody (CharacterSettings settings={}, LayerID layer=LayerManager::DEFAULT) |
| | Create rigid body.
|
| |
| | CharacterBody (Utilities::Stream &stream) |
| | Create rigidbody from text serialized data.
|
| |
| virtual std::string | GetType () const |
| | Get component type.
|
| |
| virtual Utilities::Stream | Export (Utilities::StreamType type) const |
| | Serialize component to a stream.
|
| |
| virtual void | Start () |
| | Initialize component.
|
| |
| virtual void | Deactivate () |
| | Clean up when deactivated.
|
| |
| virtual void | Update (double deltaTime) |
| | Update transform from physics Adds gravity to the current velocity.
|
| |
| void | ExtendedUpdate (double deltaTime, JPH::CharacterVirtual::ExtendedUpdateSettings updateSettings={}) |
| | Extended physics transform update.
|
| |
|
virtual | ~CharacterBody () |
| | Clean up resources.
|
| |
|
virtual bool | RefreshShape () |
| | Refresh combined collision shape Rebuilds shape from all attached colliders.
|
| |
|
bool | IsSupported () const |
| |
|
bool | IsOnGround () const |
| | Is character supported (by ground/wall)
|
| |
|
float | GetMass () const |
| | Is character on the ground.
|
| |
|
void | SetMass (float mass) |
| | Get character mass (kg)
|
| |
|
float | GetMaxStrength () const |
| | Set character mass (kg)
|
| |
|
void | SetMaxStrength (float maxStrength) |
| | Maximum force with which the character can push other bodies (N)
|
| |
|
float | GetPenetrationRecoverySpeed () const |
| |
|
void | SetPenetrationRecoverySpeed (float speed) |
| | This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in one update.
|
| |
|
float | GetCharacterPadding () const |
| | Set how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in one update.
|
| |
|
uint | GetMaxNumHits () const |
| | Character padding.
|
| |
|
void | SetMaxNumHits (uint maxHits) |
| | Max num hits to collect in order to avoid excess of contact points collection.
|
| |
|
float | GetHitReductionCosMaxAngle () const |
| | Set max num hits to collect in order to avoid excess of contact points collection.
|
| |
|
void | SetHitReductionCosMaxAngle (float cosMaxAngle) |
| | Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be merged during hit reduction.
|
| |
|
void | SetMaxSlopeAngle (float maxSlopeAngle) |
| | Set Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off.
|
| |
|
bool | IsSlopeTooSteep (Utilities::Vector3 normal) const |
| | Set the maximum angle of slope that character can still walk on (radians)
|
| |
|
| Component () |
| | Create new component.
|
| |
|
virtual | ~Component () |
| | Clean up component resources.
|
| |
| GameObject & | GetParent () const |
| | Get parent GameObject.
|
| |
| Scene & | GetScene () const |
| | Get containing Scene.
|
| |
| virtual void | Draw (const Utilities::Matrix4 &transform) |
| | Draw component visuals.
|
| |
Physics character body component.
Adds physical objects that are simulated separately from the rest of the Jolt physics rigid bodies. Handles collision shapes, forces, and motion simulation.