Skip to content

Commit

Permalink
Merge pull request #408 from Malcolmnixon/merge-from-4.0
Browse files Browse the repository at this point in the history
Merge of 4.0 features into master
  • Loading branch information
BastiaanOlij authored Mar 4, 2023
2 parents 093899f + 1898b28 commit 0b04274
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 18 deletions.
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 3.4.0 (Development)
- Fixed footstep resource leak and added jump sounds and footstep signal
- Added grab-point switching to pickable objects
- Added return-to-snap-zone feature

# 3.3.0
- Added reset-scene and scene-control functions to scene-base
Expand Down
1 change: 1 addition & 0 deletions addons/godot-xr-tools/functions/function_pose_detector.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsFunctionPoseDetector, "res://addons/godot-xr-tools/editor/icons/hand.svg"
extends Spatial

Expand Down
6 changes: 0 additions & 6 deletions addons/godot-xr-tools/functions/movement_wind.gd
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,3 @@ func physics_movement(delta: float, player_body: XRToolsPlayerBody, _disabled: b
var drag_factor := _active_wind_area.drag * drag_multiplier * delta
drag_factor = clamp(drag_factor, 0.0, 1.0)
player_body.velocity = lerp(player_body.velocity, wind_velocity, drag_factor)


# This method verifies the movement provider has a valid configuration.
func _get_configuration_warning():
# Call base class
return ._get_configuration_warning()
1 change: 1 addition & 0 deletions addons/godot-xr-tools/hands/hand_physics_bone.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsHandPhysicsBone
extends BoneAttachment

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsInteractableHandleDriven
extends Spatial

Expand Down
1 change: 1 addition & 0 deletions addons/godot-xr-tools/interactables/interactable_hinge.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsInteractableHinge
extends XRToolsInteractableHandleDriven

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsInteractableJoystick
extends XRToolsInteractableHandleDriven

Expand Down
1 change: 1 addition & 0 deletions addons/godot-xr-tools/interactables/interactable_slider.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsInteractableSlider
extends XRToolsInteractableHandleDriven

Expand Down
28 changes: 17 additions & 11 deletions addons/godot-xr-tools/objects/grab_points/grab_point_hand.gd
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,8 @@ func can_grab(_grabber : Node) -> bool:
if not enabled:
return false

# Ensure the pickup is valid
if not is_instance_valid(_grabber):
return false

# Ensure the pickup is a function pickup for a controller
var pickup := _grabber as XRToolsFunctionPickup
if not pickup:
return false

# Get the parent controller
var controller := pickup.get_controller()
# Get the grabber controller
var controller := _get_grabber_controller(_grabber)
if not controller:
return false

Expand Down Expand Up @@ -130,3 +121,18 @@ func _update_editor_preview() -> void:

# Add the editor-preview hand as a child
add_child(_editor_preview_hand)


# Get the controller associated with a grabber
static func _get_grabber_controller(_grabber : Node) -> ARVRController:
# Ensure the grabber is valid
if not is_instance_valid(_grabber):
return null

# Ensure the pickup is a function pickup for a controller
var pickup := _grabber as XRToolsFunctionPickup
if not pickup:
return null

# Get the controller associated with the pickup
return pickup.get_controller()
1 change: 1 addition & 0 deletions addons/godot-xr-tools/objects/hand_pose_area.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsHandPoseArea, "res://addons/godot-xr-tools/editor/icons/hand.svg"
extends Area

Expand Down
1 change: 1 addition & 0 deletions addons/godot-xr-tools/objects/interactable_area.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsInteractableArea
extends Area

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsVirtualKeyboard2D
extends CanvasLayer

Expand Down
1 change: 1 addition & 0 deletions addons/godot-xr-tools/objects/wind_area.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tool
class_name XRToolsWindArea
extends Area

Expand Down
2 changes: 1 addition & 1 deletion scenes/pickable_demo/pickable_demo.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[ext_resource path="res://scenes/pickable_demo/objects/saucer.tscn" type="PackedScene" id=20]
[ext_resource path="res://scenes/pickable_demo/objects/teacup_stand.tscn" type="PackedScene" id=21]
[ext_resource path="res://scenes/pickable_demo/objects/instructions.tscn" type="PackedScene" id=22]
[ext_resource path="res://scenes/pickable_demo/objects/BeltSnapZone.tscn" type="PackedScene" id=23]
[ext_resource path="res://scenes/pickable_demo/objects/belt_snap_zone.tscn" type="PackedScene" id=23]
[ext_resource path="res://scenes/pickable_demo/objects/knife.tscn" type="PackedScene" id=24]
[ext_resource path="res://addons/godot-xr-tools/objects/return_to_snap_zone.gd" type="Script" id=25]

Expand Down

0 comments on commit 0b04274

Please sign in to comment.