From a8b66a60dca81a4e5d4ab995226b77ba29bc70c3 Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sat, 16 Jul 2022 04:20:11 +0200 Subject: basic camera movement also events for other movements --- godot/scenes/Game.tscn | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'godot/scenes/Game.tscn') diff --git a/godot/scenes/Game.tscn b/godot/scenes/Game.tscn index a37a7eb..320f926 100644 --- a/godot/scenes/Game.tscn +++ b/godot/scenes/Game.tscn @@ -1,18 +1,33 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://native/Game.gdns" type="Script" id=1] -[ext_resource path="res://scenes/SpinningCube.tscn" type="PackedScene" id=2] +[ext_resource path="res://native/BasicDie.gdns" type="Script" id=2] [sub_resource type="CubeMesh" id=1] +[sub_resource type="BoxShape" id=2] + [node name="Game" type="Spatial"] script = ExtResource( 1 ) -[node name="Camera" type="Camera" parent="."] -transform = Transform( 0.572229, -0.327396, 0.751909, 0, 0.916856, 0.399217, -0.820094, -0.228443, 0.524651, 4.71648, 2.5, 3.45846 ) -current = true +[node name="RigidBody" type="RigidBody" parent="."] +script = ExtResource( 2 ) +base/camera_offset = 500.0 +base/camera_clamp = Vector2( 0, -1 ) +shooting/max_force = 100.0 +shooting/up_angle = 5.0 +input/mouse_sensitivity = Vector2( 0.05, 0.05 ) -[node name="SpinningCube" parent="." instance=ExtResource( 2 )] +[node name="MeshInstance" type="MeshInstance" parent="RigidBody"] mesh = SubResource( 1 ) material/0 = null -base/rotate_speed = 1.0 + +[node name="CollisionShape" type="CollisionShape" parent="RigidBody"] +shape = SubResource( 2 ) + +[node name="CameraArmHorizontal" type="Spatial" parent="RigidBody"] + +[node name="CameraArmVertical" type="Spatial" parent="RigidBody/CameraArmHorizontal"] + +[node name="Camera" type="Camera" parent="RigidBody/CameraArmHorizontal/CameraArmVertical"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10 ) -- cgit From bc0a59f2955b1e8bfd0870860d33c04205e6389e Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sat, 16 Jul 2022 05:58:09 +0200 Subject: applying force after pressing leftclick and dragging the mouse --- godot/scenes/Game.tscn | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'godot/scenes/Game.tscn') diff --git a/godot/scenes/Game.tscn b/godot/scenes/Game.tscn index 320f926..f569f85 100644 --- a/godot/scenes/Game.tscn +++ b/godot/scenes/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://native/Game.gdns" type="Script" id=1] [ext_resource path="res://native/BasicDie.gdns" type="Script" id=2] @@ -7,15 +7,20 @@ [sub_resource type="BoxShape" id=2] +[sub_resource type="CubeMesh" id=3] + +[sub_resource type="BoxShape" id=4] + [node name="Game" type="Spatial"] script = ExtResource( 1 ) [node name="RigidBody" type="RigidBody" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.25589, 0 ) script = ExtResource( 2 ) -base/camera_offset = 500.0 -base/camera_clamp = Vector2( 0, -1 ) +camera/camera_clamp = Vector2( 0, -1.5 ) shooting/max_force = 100.0 -shooting/up_angle = 5.0 +shooting/up_angle = 1.0 +shooting/stopping_velocity = 10.0 input/mouse_sensitivity = Vector2( 0.05, 0.05 ) [node name="MeshInstance" type="MeshInstance" parent="RigidBody"] @@ -31,3 +36,13 @@ shape = SubResource( 2 ) [node name="Camera" type="Camera" parent="RigidBody/CameraArmHorizontal/CameraArmVertical"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10 ) + +[node name="StaticBody" type="StaticBody" parent="."] +transform = Transform( 100, 0, 0, 0, 0.1, 0, 0, 0, 100, 0, 0, 0 ) + +[node name="MeshInstance" type="MeshInstance" parent="StaticBody"] +mesh = SubResource( 3 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="StaticBody"] +shape = SubResource( 4 ) -- cgit From 5678a04042b7b2ea52a927101cf66064535dc272 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 16 Jul 2022 11:42:39 +0200 Subject: add separate shooting intensity --- godot/scenes/Game.tscn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'godot/scenes/Game.tscn') diff --git a/godot/scenes/Game.tscn b/godot/scenes/Game.tscn index f569f85..ca90458 100644 --- a/godot/scenes/Game.tscn +++ b/godot/scenes/Game.tscn @@ -17,11 +17,11 @@ script = ExtResource( 1 ) [node name="RigidBody" type="RigidBody" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.25589, 0 ) script = ExtResource( 2 ) -camera/camera_clamp = Vector2( 0, -1.5 ) -shooting/max_force = 100.0 +camera/camera_clamp = Vector2( 1.608, -2.526 ) +shooting/max_force = 30.0 shooting/up_angle = 1.0 -shooting/stopping_velocity = 10.0 -input/mouse_sensitivity = Vector2( 0.05, 0.05 ) +input/camera_mouse_sensitivity = Vector2( 0.01, 0.008 ) +input/shoot_sensitivity = 0.069 [node name="MeshInstance" type="MeshInstance" parent="RigidBody"] mesh = SubResource( 1 ) -- cgit From fe8d9853148e7d3a798d9e14cb0288f7538f88ba Mon Sep 17 00:00:00 2001 From: David Date: Sat, 16 Jul 2022 14:34:11 +0200 Subject: new node structure --- godot/scenes/Game.tscn | 53 +++----------------------------------------------- 1 file changed, 3 insertions(+), 50 deletions(-) (limited to 'godot/scenes/Game.tscn') diff --git a/godot/scenes/Game.tscn b/godot/scenes/Game.tscn index 0eb902d..72fef4e 100644 --- a/godot/scenes/Game.tscn +++ b/godot/scenes/Game.tscn @@ -1,56 +1,9 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://native/Game.gdns" type="Script" id=1] -[ext_resource path="res://native/BasicDie.gdns" type="Script" id=2] -[ext_resource path="res://scenes/levels/test_scene_uuuhhh/TestSceneUuuhhh.tscn" type="PackedScene" id=2] - -[sub_resource type="CubeMesh" id=1] - -[sub_resource type="BoxShape" id=2] - -[sub_resource type="CubeMesh" id=3] - -[sub_resource type="BoxShape" id=4] +[ext_resource path="res://scenes/levels/test_scene_movement/TestSceneMovement.tscn" type="PackedScene" id=2] [node name="Game" type="Spatial"] script = ExtResource( 1 ) -[node name="Camera" type="Camera" parent="."] -transform = Transform( -0.538224, 0.336461, -0.772728, 0, 0.916856, 0.399217, 0.842802, 0.214868, -0.493474, -6.58972, 3.31005, -7.31211 ) -current = true -fov = 64.6875 - -[node name="TestSceneUuuhhh" parent="." instance=ExtResource( 2 )] - -[node name="RigidBody" type="RigidBody" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.25589, 0 ) -script = ExtResource( 2 ) -camera/camera_clamp = Vector2( 1.608, -2.526 ) -shooting/max_force = 30.0 -shooting/up_angle = 1.0 -input/camera_mouse_sensitivity = Vector2( 0.01, 0.008 ) -input/shoot_sensitivity = 0.069 - -[node name="MeshInstance" type="MeshInstance" parent="RigidBody"] -mesh = SubResource( 1 ) -material/0 = null - -[node name="CollisionShape" type="CollisionShape" parent="RigidBody"] -shape = SubResource( 2 ) - -[node name="CameraArmHorizontal" type="Spatial" parent="RigidBody"] - -[node name="CameraArmVertical" type="Spatial" parent="RigidBody/CameraArmHorizontal"] - -[node name="Camera" type="Camera" parent="RigidBody/CameraArmHorizontal/CameraArmVertical"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10 ) - -[node name="StaticBody" type="StaticBody" parent="."] -transform = Transform( 100, 0, 0, 0, 0.1, 0, 0, 0, 100, 0, 0, 0 ) - -[node name="MeshInstance" type="MeshInstance" parent="StaticBody"] -mesh = SubResource( 3 ) -material/0 = null - -[node name="CollisionShape" type="CollisionShape" parent="StaticBody"] -shape = SubResource( 4 ) +[node name="TestScene" parent="." instance=ExtResource( 2 )] -- cgit