0 votes

My immediate problem is that I have a KinematicBody designed to "lock on" to a target's location by moving there as fast as possible. This code works perfectly in a little demo with two meshes; however, when I set the target to an ARVRController, the KinematicBody running this code zooms really far away instead of moving toward the controller.

extends KinematicBody

var target
export(NodePath) var target_path

func _ready():
target = get_node(target_path)

func _physics_process(delta):
var direction = target.global_transform.origin - global_transform.origin

The problem at large that I've been trying to solve is that I need both my player and my controllers to have KinematicBodies so they can interact with the world. However, ARVR expects ARVRController to be nested within ARVROrigin, but collisions don't work properly if the KinematicBodies are nested

I would be happy if you could either explain why my code sample doesn't work with an ARVRController target, or if you could explain how to have kinematic bodies for the ARVROrigin and ARVRControllers without breaking the nesting that ARVR expects

Godot version 3.2.3
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.