-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from Nitwel/testing
Add collision shapes to the walls
- Loading branch information
Showing
8 changed files
with
107 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://cn3axur15ftft"] | ||
|
||
[sub_resource type="SphereShape3D" id="SphereShape3D_orlq6"] | ||
radius = 0.08 | ||
|
||
[sub_resource type="SphereMesh" id="SphereMesh_rfu32"] | ||
radius = 0.08 | ||
height = 0.16 | ||
|
||
[node name="Ball" type="RigidBody3D"] | ||
angular_damp = 39.224 | ||
|
||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] | ||
shape = SubResource("SphereShape3D_orlq6") | ||
|
||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."] | ||
mesh = SubResource("SphereMesh_rfu32") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
extends Node3D | ||
|
||
const ball_scene = preload("res://content/ui/menu/settings/ball.tscn") | ||
|
||
@onready var clickable = $Button/Clickable | ||
@onready var balls = $Balls | ||
|
||
func _ready(): | ||
clickable.on_click.connect(func(event): | ||
var ball = ball_scene.instantiate() | ||
ball.transform = event.controller.transform | ||
ball.linear_velocity = -event.controller.transform.basis.z * 5 + Vector3(0, 5, 0) | ||
get_tree().root.add_child(ball) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://c6r4higceibif"] | ||
|
||
[ext_resource type="Script" path="res://content/ui/menu/settings/settings_menu.gd" id="1_0lte6"] | ||
[ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="1_faxng"] | ||
[ext_resource type="Script" path="res://content/functions/clickable.gd" id="3_qmg6q"] | ||
|
||
[node name="SettingsMenu" type="Node3D"] | ||
script = ExtResource("1_0lte6") | ||
|
||
[node name="Button" parent="." instance=ExtResource("1_faxng")] | ||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0458097, 0, 0.0435752) | ||
|
||
[node name="Label3D" type="Label3D" parent="Button"] | ||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.138567, 0, 0) | ||
pixel_size = 0.001 | ||
text = "Spawn Ball" | ||
|
||
[node name="Clickable" type="Node" parent="Button"] | ||
script = ExtResource("3_qmg6q") |