Create Player Controller (#4)
* add player scene * add some logic to control player velocity * add debug scene and reset main scene * add sun and env to debug scene; fix normalization of movement * add kenney WIP assets for debug * fix movement further and add jump * add mouse camera control * add sprinting * add crouching * use constants for height * try to improve crouching by checking to see if there is a collision above before un-crouching * update README about line width * move test cube in front of playercontroller
This commit is contained in:
24
Player/player_controller.tscn
Normal file
24
Player/player_controller.tscn
Normal file
@@ -0,0 +1,24 @@
|
||||
[gd_scene format=3 uid="uid://diipi3w18rk4v"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bhplq3tsshgsb" path="res://Player/player_controller.gd" id="1_biqn8"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_biqn8"]
|
||||
height = 1.0
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_biqn8"]
|
||||
|
||||
[node name="PlayerController" type="CharacterBody3D" unique_id=1462541278]
|
||||
script = ExtResource("1_biqn8")
|
||||
|
||||
[node name="BodyCollisionShape" type="CollisionShape3D" parent="." unique_id=1091416129]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_biqn8")
|
||||
|
||||
[node name="FPSCamera" type="Camera3D" parent="." unique_id=872643079]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
||||
|
||||
[node name="HeadCollider" type="Area3D" parent="." unique_id=2069486354]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0033772, 0)
|
||||
|
||||
[node name="HeadCollisionShape" type="CollisionShape3D" parent="HeadCollider" unique_id=64452340]
|
||||
shape = SubResource("BoxShape3D_biqn8")
|
||||
Reference in New Issue
Block a user