mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:47:41 +02:00
CharacterController don't fight MyaAvatar::safeLanding()
This commit is contained in:
parent
de476d0569
commit
6d7565a568
1 changed files with 2 additions and 2 deletions
|
@ -2733,7 +2733,7 @@ void MyAvatar::nextAttitude(glm::vec3 position, glm::quat orientation) {
|
||||||
void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) {
|
void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) {
|
||||||
glm::vec3 position;
|
glm::vec3 position;
|
||||||
glm::quat orientation;
|
glm::quat orientation;
|
||||||
if (_characterController.isEnabledAndReady()) {
|
if (_characterController.isEnabledAndReady() && !_characterController.isStuck()) {
|
||||||
_characterController.getPositionAndOrientation(position, orientation);
|
_characterController.getPositionAndOrientation(position, orientation);
|
||||||
} else {
|
} else {
|
||||||
position = getWorldPosition();
|
position = getWorldPosition();
|
||||||
|
@ -2746,7 +2746,7 @@ void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) {
|
||||||
setWorldVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity());
|
setWorldVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity());
|
||||||
if (_characterController.isStuck()) {
|
if (_characterController.isStuck()) {
|
||||||
_physicsSafetyPending = true;
|
_physicsSafetyPending = true;
|
||||||
_goToPosition = getWorldPosition();
|
_goToPosition = position;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setWorldVelocity(getWorldVelocity() + _characterController.getFollowVelocity());
|
setWorldVelocity(getWorldVelocity() + _characterController.getFollowVelocity());
|
||||||
|
|
Loading…
Reference in a new issue