Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional node-searching helper functions. #259

Merged
merged 1 commit into from
Nov 13, 2022

Conversation

Malcolmnixon
Copy link
Collaborator

The additional find_children() and find_child() methods are intended to assist in finding nodes. For example some movement providers need to find function or movement nodes under the controllers. This can be achieved by:

# Get left controller
var left_controller : ARVRController = ARVRHelpers.get_left_controller(self)

# Get left controllers pickup
var left_pickup : XRToolsFunctionPickup = ARVRHelpers.find_child(left_controller, "*", "XRToolsFunctionPickup")

# Get left controllers direct movement
var left_direct : XRToolsMovementDirect = ARVRHelpers.find_child(left_controller, "*", "XRToolsMovementDirect")

Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Malcolmnixon Malcolmnixon merged commit f1e1ef2 into GodotVR:master Nov 13, 2022
@Malcolmnixon Malcolmnixon deleted the find-nodes-helper branch November 13, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants