History

mouse ray pick

SamGondelman committed 9 years ago

Commit 912b4171 parent c6b3f697 files · +99 −10Browse files

Showing the changes to interface/src/raypick/LaserPointerScriptingInterface.cpp (1 of 7 files). Show all

Unified · Split

interface/src/raypick/LaserPointerScriptingInterface.cpp+14−10
@@ -88,18 +88,22 @@ uint32_t LaserPointerScriptingInterface::createLaserPointer(const QVariant& prop · 87 unmodified lines
8888 if (propertyMap["joint"].isValid()) {
8989 QString jointName = propertyMap["joint"].toString();
9090
91− // x = upward, y = forward, z = lateral
92− glm::vec3 posOffset = Vectors::ZERO;
93− if (propertyMap["posOffset"].isValid()) {
94− posOffset = vec3FromVariant(propertyMap["posOffset"]);
95− }
91+ if (jointName != "Mouse") {
92+ // x = upward, y = forward, z = lateral
93+ glm::vec3 posOffset = Vectors::ZERO;
94+ if (propertyMap["posOffset"].isValid()) {
95+ posOffset = vec3FromVariant(propertyMap["posOffset"]);
96+ }
9697
97− glm::vec3 dirOffset = Vectors::UP;
98− if (propertyMap["dirOffset"].isValid()) {
99− dirOffset = vec3FromVariant(propertyMap["dirOffset"]);
100− }
98+ glm::vec3 dirOffset = Vectors::UP;
99+ if (propertyMap["dirOffset"].isValid()) {
100+ dirOffset = vec3FromVariant(propertyMap["dirOffset"]);
101+ }
101102
102− return DependencyManager::get<LaserPointerManager>()->createLaserPointer(jointName, posOffset, dirOffset, filter, maxDistance, renderStates, faceAvatar, centerEndY, enabled);
103+ return DependencyManager::get<LaserPointerManager>()->createLaserPointer(jointName, posOffset, dirOffset, filter, maxDistance, renderStates, faceAvatar, centerEndY, enabled);
104+ } else {
105+ return DependencyManager::get<LaserPointerManager>()->createLaserPointer(filter, maxDistance, renderStates, faceAvatar, centerEndY, enabled);
106+ }
103107 } else if (propertyMap["position"].isValid()) {
104108 glm::vec3 position = vec3FromVariant(propertyMap["position"]);
105109