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

update #3

Merged
merged 33 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e89b0ef
added holodeck map
DigitalN8m4r3 Apr 29, 2023
d7f454a
instructions + teleport + table changes
DigitalN8m4r3 Apr 29, 2023
2868c52
Optimise holodeck shaders
BastiaanOlij May 3, 2023
062f442
Merge pull request #4 from BastiaanOlij/tweak_holodeck
DigitalN8m4r3 May 3, 2023
0406a29
removed obsolete files and set uv scale to 2 by 2 for the holodeck sh…
DigitalN8m4r3 May 3, 2023
cae0926
added suggested changes
DigitalN8m4r3 May 7, 2023
d5f4440
Merge pull request #460 from DigitalN8m4r3/demo_visuals_phase_one
BastiaanOlij May 7, 2023
a82f3dd
Change environment handling so we can use WorldEnvironment in level s…
BastiaanOlij May 15, 2023
1592656
Merge pull request #464 from BastiaanOlij/change_environment
BastiaanOlij May 17, 2023
cda5d71
Audio demo (#469)
DigitalN8m4r3 Jun 16, 2023
f09354a
Re-implement push bodies (#470)
BastiaanOlij Jul 1, 2023
3b81089
233 - add dead zone to user settings (#468)
surreal6 Jul 22, 2023
9812f11
Restore correct movement - forwards/backwards on & strafing optional …
Malcolmnixon Jul 25, 2023
b1a9555
Modified CharacterBody3D to use the ground 'up' vector for up_directi…
Malcolmnixon Jul 25, 2023
8678e82
Add render target size multiplier option to StartXR (#450)
Malcolmnixon Jul 26, 2023
7e1f7e5
Tweak the demo path so it calculates the same for Godot 4.0 and 4.1 (…
Malcolmnixon Jul 29, 2023
c446462
Fix the poke lag (#489)
Malcolmnixon Jul 29, 2023
d7bb0b8
Refactor player height adjustment (#475)
BastiaanOlij Jul 29, 2023
bb12099
Support XRToolsHand being any depth under an XRController3D. (#491)
Malcolmnixon Jul 31, 2023
95d11be
Mark project settings as basic so they are always shown (#492)
BastiaanOlij Aug 1, 2023
7b4177f
Implement collision hands (#490)
Malcolmnixon Aug 2, 2023
4b2281c
Merge gravity_up_plane/gravity_up_vector to gravity_up - plane with n…
Malcolmnixon Aug 5, 2023
9cdf19a
Allow using custom material for screen (#493)
Malcolmnixon Aug 5, 2023
b441056
Added new signals to function pointer. (#502)
Malcolmnixon Aug 8, 2023
4c2aef1
Move the collider from "around" the screen to "behind" the screen. (#…
Malcolmnixon Aug 8, 2023
5bb35f3
#505: Added check for a valid `AudioStreamPlayer3D` node. (#506)
jkankiewicz Aug 18, 2023
651413a
Cleaned up teleport (#504)
Malcolmnixon Aug 18, 2023
21cc97e
Pickup highlight improvements (#503)
Malcolmnixon Aug 18, 2023
154e861
Fixed player height override when the world is scaled Added player-si…
Malcolmnixon Aug 18, 2023
ab13127
Added passing of data between staged scenes (#509)
Malcolmnixon Aug 21, 2023
22b11cf
Cleanup teleport (#508)
Malcolmnixon Aug 21, 2023
a74e6ca
Added multi-touch support (#507)
Malcolmnixon Aug 21, 2023
75178ba
Added process_physics_priority settings for Godot 4.1+ (#510)
Malcolmnixon Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
# 4.2.0
- Environments can now be set normally in scenes loaded through the staging system.
- Fixed issue with not being able to push rigid bodies when colliding with them.
- Fixed player movement on slopes.
- Fixed lag in finger-poke.
- Added initial collision hand support.
- Added support for custom materials for 2D in 3D viewport
- Updated pointer to support visibility properties and events
- Modified virtual keyboard to expose viewport controls and default to unshaded
- Cleaned up teleport and added more properties for customization
- Modified pickup highlighting to support pickables in snap-zones
- Added "UI Objects" layer 23 for viewports to support interaction by pointer and poking
- Fixed player scaling issues with crouching and poke
- **minor-breakage** Added support for passing user data between staged scenes with default handling for spawn-points
- Moved teleport logic to player and added teleport area node
- Change pointer event dispatching
- Added multi-touch on 2D in 3D viewports and virtual-keyboard
- Added option to disable laser-pointers when close to specific bodies/areas

# 4.1.0
- Enhanced grappling to support collision and target layers
- Added Godot Editor XR Tools menu for layers and openxr configuration
- Improved gliding to support roll-turning while flapping
- Added render_target_size_multiplier to StartXR (requires Godot 4.1+)

# 4.0.0
- Conversion to Godot 4
Expand Down
53 changes: 53 additions & 0 deletions addons/godot-xr-tools/audio/area_audio.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@tool
@icon("res://addons/godot-xr-tools/editor/icons/audio.svg")
class_name XRToolsAreaAudio
extends AudioStreamPlayer3D


## XRTools Area Audio
##
## This node is attached as a child of a Area3D,
## since all the interactables are actualy Extensions of the Area3D,
## this node will work on those as well


## XRToolsAreaAudioType to associate with this Area Audio
@export var area_audio_type : XRToolsAreaAudioType

@onready var area : Area3D = get_parent()


# Add support for is_class on XRTools classes
func is_xr_class(name : String) -> bool:
return name == "XRToolsAreaAudio"


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
# Listen for enter
area.body_entered.connect(_on_body_entered)
# Listen for exit
area.body_exited.connect(_on_body_exited)


func _on_body_entered(_body):
if playing:
stop()
stream = area_audio_type.touch_sound
play()


func _on_body_exited(_body):
if playing:
stop()


# This method checks for configuration issues.
func _get_configuration_warnings() -> PackedStringArray:
var warnings := PackedStringArray()

if !area_audio_type:
warnings.append("Area audio type not specified")

# Return warnings
return warnings
8 changes: 8 additions & 0 deletions addons/godot-xr-tools/audio/area_audio.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://duqehif60vcjg"]

[ext_resource type="Script" path="res://addons/godot-xr-tools/audio/area_audio.gd" id="1_q1jr0"]

[node name="AreaAudio" type="AudioStreamPlayer3D"]
unit_size = 3.0
max_distance = 100.0
script = ExtResource("1_q1jr0")
28 changes: 28 additions & 0 deletions addons/godot-xr-tools/audio/area_audio_type.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@tool
@icon("res://addons/godot-xr-tools/editor/icons/audio.svg")
class_name XRToolsAreaAudioType
extends Resource


## XRTools Area Audio Type Resource
##
## This resource defines the audio stream to play when
## a objects enters it


## Surface name
@export var name : String = ""

## Optional audio stream to play when the player lands on this surface
@export var touch_sound : AudioStream


# This method checks for configuration issues.
func _get_configuration_warnings() -> PackedStringArray:
var warnings := PackedStringArray()

if name == "":
warnings.append("Area audio type must have a name")

# Return warnings
return warnings
79 changes: 79 additions & 0 deletions addons/godot-xr-tools/audio/pickable_audio.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@tool
@icon("res://addons/godot-xr-tools/editor/icons/audio.svg")
class_name XRToolsPickableAudio
extends AudioStreamPlayer3D


## XRTools Pickable Audio
##
## This node is attached as a child of a Pickable,
## it plays audio for drop and hit based on velocity,
## along with a audio for when the object is being picked up.


## XRToolsPickableAudioType to associate with this pickable
@export var pickable_audio_type : XRToolsPickableAudioType

## delta throttle is 1/10 of delta
@onready var delta_throttle : float = 0.1

@onready var _pickable : XRToolsPickable = get_parent()


# Add support for is_class on XRTools classes
func is_xr_class(name : String) -> bool:
return name == "XRToolsPickableAudio"


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
# Listen for when this object enters a body
_pickable.body_entered.connect(_on_body_entered)
# Listen for when this object is picked up or dropped
_pickable.picked_up.connect(_on_picked_up)
_pickable.dropped.connect(_on_dropped)


func _physics_process(_delta):
if !_pickable.sleeping:
if _pickable.linear_velocity.length() > 5:
volume_db = 0
else:
volume_db -= _pickable.linear_velocity.length() * delta_throttle


# Called when this object is picked up
func _on_picked_up(_pickable) -> void:
volume_db = 0
if playing:
stop()
stream = pickable_audio_type.grab_sound
play()


# Called when this object is dropped
func _on_dropped(_pickable) -> void:
for body in _pickable.get_colliding_bodies():
if playing:
stop()


func _on_body_entered(_body):
if playing:
stop()
if _pickable.is_picked_up():
stream = pickable_audio_type.hit_sound
else:
stream = pickable_audio_type.drop_sound
play()


# This method checks for configuration issues.
func _get_configuration_warnings() -> PackedStringArray:
var warnings := PackedStringArray()

if !pickable_audio_type:
warnings.append("Pickable audio type not specified")

# Return warnings
return warnings
9 changes: 9 additions & 0 deletions addons/godot-xr-tools/audio/pickable_audio.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://bikkxsbo8x7sd"]

[ext_resource type="Script" path="res://addons/godot-xr-tools/audio/pickable_audio.gd" id="1_cfg1k"]

[node name="PickableAudio" type="AudioStreamPlayer3D"]
unit_size = 3.0
max_db = 1.0
max_distance = 100.0
script = ExtResource("1_cfg1k")
34 changes: 34 additions & 0 deletions addons/godot-xr-tools/audio/pickable_audio_type.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@tool
@icon("res://addons/godot-xr-tools/editor/icons/audio.svg")
class_name XRToolsPickableAudioType
extends Resource


## XRTools Pickable Audio Type Resource
##
## This resource defines the audio streams to play when
## the pickable is being picked up/ dropped/ hit something while being held


## Surface name
@export var name : String = ""

## Optional audio stream to play when the player picks up the pickable
@export var grab_sound : AudioStream

## Optional audio stream to play when the player drops the pickable
@export var drop_sound : AudioStream

## Optional audio stream to play when the item is beign held by the player
@export var hit_sound : AudioStream


# This method checks for configuration issues.
func _get_configuration_warnings() -> PackedStringArray:
var warnings := PackedStringArray()

if name == "":
warnings.append("Pickable audio type must have a name")

# Return warnings
return warnings
48 changes: 48 additions & 0 deletions addons/godot-xr-tools/editor/icons/audio.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions addons/godot-xr-tools/editor/icons/audio.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dhnfbf4p0s74"
path="res://.godot/imported/audio.svg-20d7f0b624a1b2ef54f1b4d12970c8d0.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/godot-xr-tools/editor/icons/audio.svg"
dest_files=["res://.godot/imported/audio.svg-20d7f0b624a1b2ef54f1b4d12970c8d0.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false