#include <charactercontext.h>
|
static CharacterId | CreateCharacter (Math::vec3 const &position, CharacterCreateInfo const &info, IndexT scene=0) |
|
static void | DestroyCharacter (CharacterId characterId) |
|
static Character & | GetCharacter (CharacterId id) |
|
static void | SetCharacterBoxSize (CharacterId characterId, Math::vec3 const &halfExtents) |
| Sets the characters half extents. Character needs to be of box type.
|
|
static void | SetCharacterHeight (CharacterId characterId, float newHeight) |
| Sets the characters height, and adjusts the position so that it doesn't "pop" into the air.
|
|
static void | SetCharacterPosition (CharacterId characterId, Math::vec3 const &newPosition) |
| Immediately changes the character world position without doing any collision checks.
|
|
static Math::vec3 | GetCharacterCenterPosition (CharacterId characterId) |
| Get the character center point.
|
|
static Math::vec3 | GetCharacterFootPosition (CharacterId characterId) |
| Get the position of the lowest point of the characters collider in worldspace.
|
|
static CharacterCollision | MoveCharacter (CharacterId characterId, Math::vector const &displacement, float minDist, float timeSinceLastMove) |
| Displace a character, and check/resolve collisions along the way.
|
|
◆ CreateCharacter()
◆ DestroyCharacter()
void Physics::CharacterContext::DestroyCharacter |
( |
CharacterId | characterId | ) |
|
|
static |
◆ GetCharacter()
◆ GetCharacterCenterPosition()
◆ GetCharacterFootPosition()
Get the position of the lowest point of the characters collider in worldspace.
◆ MoveCharacter()
Displace a character, and check/resolve collisions along the way.
- Parameters
-
minDist | The minimum travelled distance to consider. If travelled distance is smaller, the character doesn’t move. |
timeSinceLastMove | is the amount of time that passed since the last call to the move function. |
◆ SetCharacterBoxSize()
void Physics::CharacterContext::SetCharacterBoxSize |
( |
CharacterId | characterId, |
|
|
Math::vec3 const & | halfExtents ) |
|
static |
Sets the characters half extents. Character needs to be of box type.
◆ SetCharacterHeight()
void Physics::CharacterContext::SetCharacterHeight |
( |
CharacterId | characterId, |
|
|
float | newHeight ) |
|
static |
Sets the characters height, and adjusts the position so that it doesn't "pop" into the air.
◆ SetCharacterPosition()
void Physics::CharacterContext::SetCharacterPosition |
( |
CharacterId | characterId, |
|
|
Math::vec3 const & | newPosition ) |
|
static |
Immediately changes the character world position without doing any collision checks.
The documentation for this class was generated from the following files: