2.8 the input map
This commit is contained in:
parent
03b8155b52
commit
e2bf9cea50
3 changed files with 25 additions and 3 deletions
|
@ -18,3 +18,24 @@ config/icon="res://icon.svg"
|
||||||
[dotnet]
|
[dotnet]
|
||||||
|
|
||||||
project/assembly_name="ProjectBoost"
|
project/assembly_name="ProjectBoost"
|
||||||
|
|
||||||
|
[input]
|
||||||
|
|
||||||
|
boost={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
rotate_left={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
rotate_right={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -8,13 +8,13 @@ public partial class Player : RigidBody3D
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
float fd = (float)delta;
|
float fd = (float)delta;
|
||||||
if (Input.IsActionPressed("ui_accept")){
|
if (Input.IsActionPressed("boost")){
|
||||||
ApplyCentralForce(Basis.Y * fd * 1000.0f);
|
ApplyCentralForce(Basis.Y * fd * 1000.0f);
|
||||||
}
|
}
|
||||||
if (Input.IsActionPressed("ui_left")){
|
if (Input.IsActionPressed("rotate_left")){
|
||||||
ApplyTorque(ZLeft * fd);
|
ApplyTorque(ZLeft * fd);
|
||||||
}
|
}
|
||||||
if (Input.IsActionPressed("ui_right")){
|
if (Input.IsActionPressed("rotate_right")){
|
||||||
ApplyTorque(ZRight * fd);
|
ApplyTorque(ZRight * fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ material = SubResource("StandardMaterial3D_5641g")
|
||||||
|
|
||||||
[node name="LandingPad" type="CSGBox3D" parent="."]
|
[node name="LandingPad" type="CSGBox3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 0)
|
||||||
|
use_collision = true
|
||||||
size = Vector3(2, 0.4, 2)
|
size = Vector3(2, 0.4, 2)
|
||||||
material = SubResource("StandardMaterial3D_cjryw")
|
material = SubResource("StandardMaterial3D_cjryw")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue