|
JPH_OVERRIDE_NEW_DELETE | Character (const CharacterSettings *inSettings, RVec3Arg inPosition, QuatArg inRotation, uint64 inUserData, PhysicsSystem *inSystem) |
|
virtual | ~Character () override |
| Destructor. More...
|
|
void | AddToPhysicsSystem (EActivation inActivationMode=EActivation::Activate, bool inLockBodies=true) |
| Add bodies and constraints to the system and optionally activate the bodies. More...
|
|
void | RemoveFromPhysicsSystem (bool inLockBodies=true) |
| Remove bodies and constraints from the system. More...
|
|
void | Activate (bool inLockBodies=true) |
| Wake up the character. More...
|
|
void | PostSimulation (float inMaxSeparationDistance, bool inLockBodies=true) |
|
void | SetLinearAndAngularVelocity (Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity, bool inLockBodies=true) |
| Control the velocity of the character. More...
|
|
Vec3 | GetLinearVelocity (bool inLockBodies=true) const |
| Get the linear velocity of the character (m / s) More...
|
|
void | SetLinearVelocity (Vec3Arg inLinearVelocity, bool inLockBodies=true) |
| Set the linear velocity of the character (m / s) More...
|
|
void | AddLinearVelocity (Vec3Arg inLinearVelocity, bool inLockBodies=true) |
| Add world space linear velocity to current velocity (m / s) More...
|
|
void | AddImpulse (Vec3Arg inImpulse, bool inLockBodies=true) |
| Add impulse to the center of mass of the character. More...
|
|
BodyID | GetBodyID () const |
| Get the body associated with this character. More...
|
|
void | GetPositionAndRotation (RVec3 &outPosition, Quat &outRotation, bool inLockBodies=true) const |
| Get position / rotation of the body. More...
|
|
void | SetPositionAndRotation (RVec3Arg inPosition, QuatArg inRotation, EActivation inActivationMode=EActivation::Activate, bool inLockBodies=true) const |
| Set the position / rotation of the body, optionally activating it. More...
|
|
RVec3 | GetPosition (bool inLockBodies=true) const |
| Get the position of the character. More...
|
|
void | SetPosition (RVec3Arg inPostion, EActivation inActivationMode=EActivation::Activate, bool inLockBodies=true) |
| Set the position of the character, optionally activating it. More...
|
|
Quat | GetRotation (bool inLockBodies=true) const |
| Get the rotation of the character. More...
|
|
void | SetRotation (QuatArg inRotation, EActivation inActivationMode=EActivation::Activate, bool inLockBodies=true) |
| Set the rotation of the character, optionally activating it. More...
|
|
RVec3 | GetCenterOfMassPosition (bool inLockBodies=true) const |
| Position of the center of mass of the underlying rigid body. More...
|
|
RMat44 | GetWorldTransform (bool inLockBodies=true) const |
| Calculate the world transform of the character. More...
|
|
void | SetLayer (ObjectLayer inLayer, bool inLockBodies=true) |
| Update the layer of the character. More...
|
|
bool | SetShape (const Shape *inShape, float inMaxPenetrationDepth, bool inLockBodies=true) |
|
void | CheckCollision (RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inMovementDirection, float inMaxSeparationDistance, const Shape *inShape, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector, bool inLockBodies=true) const |
| Get all contacts for the character at a particular location. More...
|
|
JPH_OVERRIDE_NEW_DELETE | CharacterBase (const CharacterBaseSettings *inSettings, PhysicsSystem *inSystem) |
| Constructor. More...
|
|
virtual | ~CharacterBase ()=default |
| Destructor. More...
|
|
void | SetMaxSlopeAngle (float inMaxSlopeAngle) |
| Set the maximum angle of slope that character can still walk on (radians) More...
|
|
float | GetCosMaxSlopeAngle () const |
|
void | SetUp (Vec3Arg inUp) |
| Set the up vector for the character. More...
|
|
Vec3 | GetUp () const |
|
bool | IsSlopeTooSteep (Vec3Arg inNormal) const |
| Check if the normal of the ground surface is too steep to walk on. More...
|
|
const Shape * | GetShape () const |
| Get the current shape that the character is using. More...
|
|
EGroundState | GetGroundState () const |
| Current ground state. More...
|
|
bool | IsSupported () const |
| Returns true if the player is supported by normal or steep ground. More...
|
|
RVec3 | GetGroundPosition () const |
| Get the contact point with the ground. More...
|
|
Vec3 | GetGroundNormal () const |
| Get the contact normal with the ground. More...
|
|
Vec3 | GetGroundVelocity () const |
| Velocity in world space of ground. More...
|
|
const PhysicsMaterial * | GetGroundMaterial () const |
| Material that the character is standing on. More...
|
|
BodyID | GetGroundBodyID () const |
| BodyID of the object the character is standing on. Note may have been removed! More...
|
|
SubShapeID | GetGroundSubShapeID () const |
| Sub part of the body that we're standing on. More...
|
|
uint64 | GetGroundUserData () const |
| User data value of the body that we're standing on. More...
|
|
virtual void | SaveState (StateRecorder &inStream) const |
|
virtual void | RestoreState (StateRecorder &inStream) |
|
| RefTarget ()=default |
| Constructor. More...
|
|
| RefTarget (const RefTarget &) |
|
| ~RefTarget () |
| assert no one is referencing us More...
|
|
void | SetEmbedded () const |
|
RefTarget & | operator= (const RefTarget &) |
| Assignment operator. More...
|
|
uint32 | GetRefCount () const |
| Get current refcount of this object. More...
|
|
void | AddRef () const |
| Add or release a reference to this object. More...
|
|
void | Release () const |
|
| NonCopyable ()=default |
|
| NonCopyable (const NonCopyable &)=delete |
|
void | operator= (const NonCopyable &)=delete |
|
Runtime character object. This object usually represents the player or a humanoid AI. It uses a single rigid body, usually with a capsule shape to simulate movement and collision for the character. The character is a keyframed object, the application controls it by setting the velocity.