fix XRSimulator
This commit is contained in:
parent
9e280b60f7
commit
f0aae4a7ab
|
@ -84,7 +84,6 @@ func _ready():
|
|||
right_tracker.set_pose(pose, child.transform, Vector3.ZERO, Vector3.ZERO, XRPose.XR_TRACKING_CONFIDENCE_HIGH)
|
||||
XRServer.add_tracker(right_tracker)
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
if enabled and disable_xr_in_editor and OS.has_feature("editor") and viewport.use_xr:
|
||||
viewport.use_xr = false
|
||||
|
@ -219,7 +218,7 @@ func attract_controller(event: InputEventMouseButton, controller: XRController3D
|
|||
func rotate_device(event: InputEventMouseMotion, device: Node3D):
|
||||
var motion = event.relative
|
||||
device.rotate_y(motion.x * - device_x_sensitivity / 1000)
|
||||
device.rotate(device.transform.basis.x, motion.y * -device_y_sensitivity/1000)
|
||||
device.rotate(device.transform.basis.x.normalized(), motion.y * - device_y_sensitivity / 1000)
|
||||
|
||||
func vector_key_mapping(key_positive_x: int, key_negative_x: int, key_positive_y: int, key_negative_y: int):
|
||||
var x = 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user