mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
set default to 0.35, change steps
This commit is contained in:
parent
a5b32a6406
commit
d3111011d8
3 changed files with 6 additions and 5 deletions
|
@ -186,9 +186,10 @@ void LaserPointer::RenderState::update(const glm::vec3& origin, const glm::vec3&
|
|||
|
||||
bool hasUnmodifiedEndPoint = false;
|
||||
glm::vec3 unmodifiedEndPoint;
|
||||
float directionLength = glm::length(endPoint);
|
||||
auto rayPickResult = std::static_pointer_cast<RayPickResult>(pickResult);
|
||||
if (rayPickResult && rayPickResult->pickVariant.contains("unmodifiedDirection")) {
|
||||
unmodifiedEndPoint = glm::length(endPoint) * vec3FromVariant(rayPickResult->pickVariant["unmodifiedDirection"]);
|
||||
unmodifiedEndPoint = directionLength * vec3FromVariant(rayPickResult->pickVariant["unmodifiedDirection"]);
|
||||
hasUnmodifiedEndPoint = true;
|
||||
}
|
||||
|
||||
|
@ -198,7 +199,7 @@ void LaserPointer::RenderState::update(const glm::vec3& origin, const glm::vec3&
|
|||
if (!oldProperties.getVisible() || !_hasSetLinePoints || !hasUnmodifiedEndPoint) {
|
||||
points.append(frac * endPoint);
|
||||
} else {
|
||||
points.append(frac * mix(unmodifiedEndPoint, endPoint, frac));
|
||||
points.append(frac * directionLength * glm::normalize(glm::mix(unmodifiedEndPoint, endPoint, frac)));
|
||||
}
|
||||
}
|
||||
_hasSetLinePoints = true;
|
||||
|
|
|
@ -488,7 +488,7 @@ protected:
|
|||
static void setParentTransform(std::shared_ptr<PickQuery> pick, const QVariantMap& propMap);
|
||||
|
||||
private:
|
||||
Setting::Handle<float> _handLaserDelaySetting { "handLaserDelay", 0.0f };
|
||||
Setting::Handle<float> _handLaserDelaySetting { "handLaserDelay", 0.35f };
|
||||
};
|
||||
|
||||
#endif // hifi_PickScriptingInterface_h
|
||||
|
|
|
@ -219,8 +219,8 @@ void setupPreferences() {
|
|||
auto setter = [](float value) { DependencyManager::get<PickScriptingInterface>()->setHandLaserDelay(value); };
|
||||
auto delaySlider = new SpinnerSliderPreference(UI_CATEGORY, "Laser Delay (seconds)", getter, setter);
|
||||
delaySlider->setMin(0.0f);
|
||||
delaySlider->setMax(2.0f);
|
||||
delaySlider->setStep(0.02f);
|
||||
delaySlider->setMax(0.7f);
|
||||
delaySlider->setStep(0.05f);
|
||||
delaySlider->setDecimals(2.0f);
|
||||
preferences->addPreference(delaySlider);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue