mirror of
https://github.com/overte-org/overte.git
synced 2025-08-18 08:36:51 +02:00
19369 - Added "Use Gravity" option
This commit is contained in:
parent
202c293a77
commit
5c07638ce2
2 changed files with 9 additions and 1 deletions
|
@ -915,7 +915,12 @@ void Application::idle() {
|
|||
agentList->unlock();
|
||||
|
||||
// Simulate myself
|
||||
_myAvatar.setGravity(_environment.getGravity(_myAvatar.getPosition()));
|
||||
if (_gravityUse->isChecked()) {
|
||||
_myAvatar.setGravity(_environment.getGravity(_myAvatar.getPosition()));
|
||||
}
|
||||
else {
|
||||
_myAvatar.setGravity(glm::vec3(0.0f, 0.0f, 0.0f));
|
||||
}
|
||||
if (_transmitterDrives->isChecked() && _myTransmitter.isConnected()) {
|
||||
_myAvatar.simulate(deltaTime, &_myTransmitter);
|
||||
} else {
|
||||
|
@ -1369,6 +1374,8 @@ void Application::initMenu() {
|
|||
_showHeadMouse->setChecked(false);
|
||||
(_transmitterDrives = optionsMenu->addAction("Transmitter Drive"))->setCheckable(true);
|
||||
_transmitterDrives->setChecked(true);
|
||||
(_gravityUse = optionsMenu->addAction("Use Gravity"))->setCheckable(true);
|
||||
_gravityUse->setChecked(true);
|
||||
|
||||
(_fullScreenMode = optionsMenu->addAction("Fullscreen", this, SLOT(setFullscreen(bool)), Qt::Key_F))->setCheckable(true);
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ private:
|
|||
QAction* _mouseLook; // Whether the have the mouse near edge of screen move your view
|
||||
QAction* _showHeadMouse; // Whether the have the mouse near edge of screen move your view
|
||||
QAction* _transmitterDrives; // Whether to have Transmitter data move/steer the Avatar
|
||||
QAction* _gravityUse; // Whether gravity is on or not
|
||||
QAction* _renderVoxels; // Whether to render voxels
|
||||
QAction* _renderVoxelTextures; // Whether to render noise textures on voxels
|
||||
QAction* _renderStarsOn; // Whether to display the stars
|
||||
|
|
Loading…
Reference in a new issue