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') 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