forked from SaracenOne/godot_openvr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request GodotVR#139 from BastiaanOlij/update_upstream_2022…
…0126 Updated godot-cpp to 3.4 59ecf3b and godot-xr-tools d857eb44
- Loading branch information
Showing
16 changed files
with
3,255 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
extends Spatial | ||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
var controller : ARVRController = get_parent() | ||
if controller: | ||
var grip = controller.get_joystick_axis(JOY_VR_ANALOG_GRIP) * 2.5 | ||
var trigger = controller.get_joystick_axis(JOY_VR_ANALOG_TRIGGER) * 2.5 | ||
|
||
# print("Grip: " + str(grip) + " Trigger: " + str(trigger)) | ||
|
||
$AnimationTree.set("parameters/SetGrip/seek_position", grip) | ||
$AnimationTree.set("parameters/SetIndex/seek_position", trigger) | ||
|
||
# var grip_state = controller.is_button_pressed(JOY_VR_GRIP) | ||
# print("Pressed: " + str(grip_state)) |
Binary file not shown.
Oops, something went wrong.