mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:36:44 +02:00
Added getters for State if in Air or Flying
This commit is contained in:
parent
c92e22fd20
commit
66d43b80e2
2 changed files with 10 additions and 0 deletions
|
@ -2476,6 +2476,14 @@ void MyAvatar::setFlyingEnabled(bool enabled) {
|
||||||
_enableFlying = enabled;
|
_enableFlying = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MyAvatar::isFlying() {
|
||||||
|
return _characterController.getState() == CharacterController::State::Hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MyAvatar::isInAir() {
|
||||||
|
return _characterController.getState() == CharacterController::State::InAir;
|
||||||
|
}
|
||||||
|
|
||||||
bool MyAvatar::getFlyingEnabled() {
|
bool MyAvatar::getFlyingEnabled() {
|
||||||
return _enableFlying;
|
return _enableFlying;
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,6 +491,8 @@ public:
|
||||||
|
|
||||||
bool hasDriveInput() const;
|
bool hasDriveInput() const;
|
||||||
|
|
||||||
|
Q_INVOKABLE bool isFlying();
|
||||||
|
Q_INVOKABLE bool isInAir();
|
||||||
Q_INVOKABLE void setFlyingEnabled(bool enabled);
|
Q_INVOKABLE void setFlyingEnabled(bool enabled);
|
||||||
Q_INVOKABLE bool getFlyingEnabled();
|
Q_INVOKABLE bool getFlyingEnabled();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue