mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Added Developer > Avatar > Show Detailed Collision menu option
This commit is contained in:
parent
ae98974d79
commit
49adf04913
4 changed files with 9 additions and 1 deletions
|
@ -555,6 +555,8 @@ Menu::Menu() {
|
|||
avatar.get(), SLOT(setEnableDebugDrawIKConstraints(bool)));
|
||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderIKChains, 0, false,
|
||||
avatar.get(), SLOT(setEnableDebugDrawIKChains(bool)));
|
||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderDetailedCollision, 0, false,
|
||||
avatar.get(), SLOT(setEnableDebugDrawDetailedCollision(bool)));
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ActionMotorControl,
|
||||
Qt::CTRL | Qt::SHIFT | Qt::Key_K, true, avatar.get(), SLOT(updateMotionBehaviorFromMenu()),
|
||||
|
|
|
@ -162,6 +162,7 @@ namespace MenuOption {
|
|||
const QString RenderIKTargets = "Show IK Targets";
|
||||
const QString RenderIKConstraints = "Show IK Constraints";
|
||||
const QString RenderIKChains = "Show IK Chains";
|
||||
const QString RenderDetailedCollision = "Show Detailed Collision";
|
||||
const QString ResetAvatarSize = "Reset Avatar Size";
|
||||
const QString ResetSensors = "Reset Sensors";
|
||||
const QString RunningScripts = "Running Scripts...";
|
||||
|
|
|
@ -1060,6 +1060,10 @@ void MyAvatar::setEnableDebugDrawIKConstraints(bool isEnabled) {
|
|||
_enableDebugDrawIKConstraints = isEnabled;
|
||||
}
|
||||
|
||||
void MyAvatar::setEnableDebugDrawDetailedCollision(bool isEnabled) {
|
||||
_enableDebugDrawDetailedCollision = isEnabled;
|
||||
}
|
||||
|
||||
void MyAvatar::setEnableDebugDrawIKChains(bool isEnabled) {
|
||||
_enableDebugDrawIKChains = isEnabled;
|
||||
}
|
||||
|
@ -1806,7 +1810,6 @@ void MyAvatar::postUpdate(float deltaTime) {
|
|||
|
||||
updateHoldActions(_prePhysicsRoomPose, postUpdateRoomPose);
|
||||
|
||||
bool _enableDebugDrawDetailedCollision = true;
|
||||
if (_enableDebugDrawDetailedCollision) {
|
||||
AnimPose rigToWorldPose(glm::vec3(1.0f), Quaternions::Y_180 * getRotation(), getPosition());
|
||||
const int NUM_DEBUG_COLORS = 7;
|
||||
|
|
|
@ -553,6 +553,7 @@ public slots:
|
|||
void setEnableDebugDrawIKTargets(bool isEnabled);
|
||||
void setEnableDebugDrawIKConstraints(bool isEnabled);
|
||||
void setEnableDebugDrawIKChains(bool isEnabled);
|
||||
void setEnableDebugDrawDetailedCollision(bool isEnabled);
|
||||
|
||||
bool getEnableMeshVisible() const { return _skeletonModel->isVisible(); }
|
||||
void setEnableMeshVisible(bool isEnabled);
|
||||
|
@ -757,6 +758,7 @@ private:
|
|||
bool _enableDebugDrawIKTargets { false };
|
||||
bool _enableDebugDrawIKConstraints { false };
|
||||
bool _enableDebugDrawIKChains { false };
|
||||
bool _enableDebugDrawDetailedCollision { false };
|
||||
|
||||
AudioListenerMode _audioListenerMode;
|
||||
glm::vec3 _customListenPosition;
|
||||
|
|
Loading…
Reference in a new issue