Skip to content
Snippets Groups Projects
Commit 942ef177 authored by Christian Mattes's avatar Christian Mattes
Browse files

Made enabling/disabling zoom/rotation easier in RopeLocomotion

parent 99b0e93e
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,9 @@ glm::mat4 RopeLocomotion::updateMatrix(glm::mat4 old) {
: 1.0f;
auto axis = glm::vec3{0.f, 1.f, 0.f};
auto angle = glm::orientedAngle(old_dir, new_dir, axis);
auto angle = (mConfig.allowRotation)
? glm::orientedAngle(old_dir, new_dir, axis)
: 0.0f;
auto rot = glm::rotate(angle, axis);
auto combined = glm::translate(new_cog) * rot *
......
......@@ -10,7 +10,8 @@ namespace vr {
class RopeLocomotion {
public:
struct Config {
bool allowZoom;
bool allowZoom = true;
bool allowRotation = true;
};
RopeLocomotion(lava::openvr::SharedOpenVRHmd const &output);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment