Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

A few Godot VR related questions

A topic by Kasper Hviid created Jul 16, 2024 Views: 121 Replies: 2
Viewing posts 1 to 2
Submitted

1) is there a way to adjust the pickup distance? When I play my game, I often accidentically pick up stuff from the table, so it would be nice if the pickup distance could be shorter. (I'm using the Valve Index, and picking stuff up is finickry.)

2) How do I detect a trigger press? This is such a basic thing, but I have still not figured it out, instead relying on the presets shipped with Godot XR Tools.

3) If you tried my Feet is Jump! entry, could you give it a solid roast? How could you forget X, this here aspect was the lodestone of crappiness, that sorta thing!

Submitted

On the FunctionPickup node on the controllers there should be a range and grab distance variable to adjust

Once you have access to the controller, you can use the `button_pressed` signal and parse the actions in a similar fashion to the Godot input system, ie (if pressed_button == "trigger_click"), getting the controller was the tricky part at first.  I'm not sure of all the ways to get the controllers, but theres a nice helper called like `XRHelpers.get_xr_controller(<controller_descendant>)`, so I just created my own action node, made it a child of the controller, and did `@onready var _controller := XRHelpers.get_xr_controller(self)` and then connected the signal in on ready and handled it like normal.

I'll try it out after work!

Submitted

Thanks, functionPickup had it right there, dunno how I missed it! The button  press kinda still screws with my head, but I'll keep at it.