- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the Lua code in the SteamVR template, it is scripted that you can use the touchpad to move around inside the model. This does not work. Am I missing something or is this a bug?
I really need the ability to relocate to different positions on the level.
Here is a snippet of the code that should work but doesn't seem to do anything.
-- Move character using touch pad if Bit.band(ctrl_buttons.pressed_buttons, SteamVR.BUTTON_TOUCH) ~= 0 then move = Vector3.multiply(forward_without_pitch, ctrl_buttons.touch_axis.y) if ctrl_buttons.touch_axis.x ~= 0 then local rot = degrees_90; if ctrl_buttons.touch_axis.x > 0 then rot = -rot end local rotated_forward = Quaternion.rotate( Quaternion.axis_angle(Vector3(0, 0, 1), rot), forward_without_pitch ) move = move + Vector3.multiply(rotated_forward, math.abs(ctrl_buttons.touch_axis.x)) end end
Thanks for your help.
Solved! Go to Solution.
Reply
Reply