mirror of
https://github.com/overte-org/overte.git
synced 2025-06-20 12:00:01 +02:00
Merge pull request #495 from overte-org/fix/laser_blinking
Fixed laser pointer blinking issue
This commit is contained in:
commit
9ded209afe
4 changed files with 16 additions and 15 deletions
|
@ -197,8 +197,9 @@ std::shared_ptr<StartEndRenderState> LaserPointer::buildRenderState(const QVaria
|
||||||
if (propMap["startPropertyIndex"].isValid()) {
|
if (propMap["startPropertyIndex"].isValid()) {
|
||||||
int startPropertyIndex = propMap["startPropertyIndex"].toInt();
|
int startPropertyIndex = propMap["startPropertyIndex"].toInt();
|
||||||
if (startPropertyIndex >= 0 && startPropertyIndex < entityProperties.length()) {
|
if (startPropertyIndex >= 0 && startPropertyIndex < entityProperties.length()) {
|
||||||
//startMap.remove("visible");
|
EntityItemProperties startProperties(entityProperties[startPropertyIndex]);
|
||||||
startID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(entityProperties[startPropertyIndex], entity::HostType::LOCAL);
|
startProperties.getGrab().setGrabbable(false);
|
||||||
|
startID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(startProperties, entity::HostType::LOCAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,9 +208,10 @@ std::shared_ptr<StartEndRenderState> LaserPointer::buildRenderState(const QVaria
|
||||||
// laser paths must be PolyLine
|
// laser paths must be PolyLine
|
||||||
int pathPropertyIndex = propMap["pathPropertyIndex"].toInt();
|
int pathPropertyIndex = propMap["pathPropertyIndex"].toInt();
|
||||||
if (pathPropertyIndex >= 0 && pathPropertyIndex < entityProperties.length()) {
|
if (pathPropertyIndex >= 0 && pathPropertyIndex < entityProperties.length()) {
|
||||||
//startMap.remove("visible");
|
|
||||||
//pathMap["type"].toString() == "PolyLine"
|
//pathMap["type"].toString() == "PolyLine"
|
||||||
pathID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(entityProperties[pathPropertyIndex], entity::HostType::LOCAL);
|
EntityItemProperties pathProperties(entityProperties[pathPropertyIndex]);
|
||||||
|
pathProperties.getGrab().setGrabbable(false);
|
||||||
|
pathID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(pathProperties, entity::HostType::LOCAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,8 +219,9 @@ std::shared_ptr<StartEndRenderState> LaserPointer::buildRenderState(const QVaria
|
||||||
if (propMap["endPropertyIndex"].isValid()) {
|
if (propMap["endPropertyIndex"].isValid()) {
|
||||||
int endPropertyIndex = propMap["endPropertyIndex"].toInt();
|
int endPropertyIndex = propMap["endPropertyIndex"].toInt();
|
||||||
if (endPropertyIndex >= 0 && endPropertyIndex < entityProperties.length()) {
|
if (endPropertyIndex >= 0 && endPropertyIndex < entityProperties.length()) {
|
||||||
//startMap.remove("visible");
|
EntityItemProperties endProperties(entityProperties[endPropertyIndex]);
|
||||||
endID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(entityProperties[endPropertyIndex], entity::HostType::LOCAL);
|
endProperties.getGrab().setGrabbable(false);
|
||||||
|
endID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(endProperties, entity::HostType::LOCAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -238,8 +238,9 @@ std::shared_ptr<StartEndRenderState> ParabolaPointer::buildRenderState(const QVa
|
||||||
if (propMap["startPropertyIndex"].isValid()) {
|
if (propMap["startPropertyIndex"].isValid()) {
|
||||||
int startPropertyIndex = propMap["startPropertyIndex"].toInt();
|
int startPropertyIndex = propMap["startPropertyIndex"].toInt();
|
||||||
if (startPropertyIndex >= 0 && startPropertyIndex < entityProperties.length()) {
|
if (startPropertyIndex >= 0 && startPropertyIndex < entityProperties.length()) {
|
||||||
//startMap.remove("visible");
|
EntityItemProperties startProperties(entityProperties[startPropertyIndex]);
|
||||||
startID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(entityProperties[startPropertyIndex], entity::HostType::LOCAL);
|
startProperties.getGrab().setGrabbable(false);
|
||||||
|
startID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(startProperties, entity::HostType::LOCAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,8 +279,9 @@ std::shared_ptr<StartEndRenderState> ParabolaPointer::buildRenderState(const QVa
|
||||||
if (propMap["endPropertyIndex"].isValid()) {
|
if (propMap["endPropertyIndex"].isValid()) {
|
||||||
int endPropertyIndex = propMap["endPropertyIndex"].toInt();
|
int endPropertyIndex = propMap["endPropertyIndex"].toInt();
|
||||||
if (endPropertyIndex >= 0 && endPropertyIndex < entityProperties.length()) {
|
if (endPropertyIndex >= 0 && endPropertyIndex < entityProperties.length()) {
|
||||||
//endMap.remove("visible");
|
EntityItemProperties endProperties(entityProperties[endPropertyIndex]);
|
||||||
endID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(entityProperties[endPropertyIndex], entity::HostType::LOCAL);
|
endProperties.getGrab().setGrabbable(false);
|
||||||
|
endID = DependencyManager::get<EntityScriptingInterface>()->addEntityInternal(endProperties, entity::HostType::LOCAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,8 @@ var CONTOLLER_SCRIPTS = [
|
||||||
"squeezeHands.js",
|
"squeezeHands.js",
|
||||||
"controllerDisplayManager.js",
|
"controllerDisplayManager.js",
|
||||||
"grab.js",
|
"grab.js",
|
||||||
//"toggleAdvancedMovementForHandControllers.js",
|
"toggleAdvancedMovementForHandControllers.js",
|
||||||
"handTouch.js",
|
"handTouch.js",
|
||||||
//"controllerDispatcher.js",
|
|
||||||
"controllerModules/nearParentGrabOverlay.js",
|
"controllerModules/nearParentGrabOverlay.js",
|
||||||
"controllerModules/stylusInput.js",
|
"controllerModules/stylusInput.js",
|
||||||
"controllerModules/equipEntity.js",
|
"controllerModules/equipEntity.js",
|
||||||
|
|
|
@ -2539,7 +2539,6 @@ SelectionDisplay = (function() {
|
||||||
var pickPlanePosition = null;
|
var pickPlanePosition = null;
|
||||||
var pickPlaneNormal = { x: 0, y: 1, z: 0 };
|
var pickPlaneNormal = { x: 0, y: 1, z: 0 };
|
||||||
var greatestDimension = 0.0;
|
var greatestDimension = 0.0;
|
||||||
var startingDistance = 0.0;
|
|
||||||
var startingElevation = 0.0;
|
var startingElevation = 0.0;
|
||||||
addHandleTool(toolEntity, {
|
addHandleTool(toolEntity, {
|
||||||
mode: mode,
|
mode: mode,
|
||||||
|
@ -2581,11 +2580,9 @@ SelectionDisplay = (function() {
|
||||||
greatestDimension = Math.max(Math.max(SelectionManager.worldDimensions.x,
|
greatestDimension = Math.max(Math.max(SelectionManager.worldDimensions.x,
|
||||||
SelectionManager.worldDimensions.y),
|
SelectionManager.worldDimensions.y),
|
||||||
SelectionManager.worldDimensions.z);
|
SelectionManager.worldDimensions.z);
|
||||||
startingDistance = Vec3.distance(pickRay.origin, SelectionManager.position);
|
|
||||||
startingElevation = this.elevation(pickRay.origin, pickPlanePosition);
|
startingElevation = this.elevation(pickRay.origin, pickPlanePosition);
|
||||||
if (wantDebug) {
|
if (wantDebug) {
|
||||||
print(" longest dimension: " + greatestDimension);
|
print(" longest dimension: " + greatestDimension);
|
||||||
print(" starting distance: " + startingDistance);
|
|
||||||
print(" starting elevation: " + startingElevation);
|
print(" starting elevation: " + startingElevation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue