Add dungman
This commit is contained in:
parent
2c47b309ae
commit
4c3f01a835
BIN
assets/protodungman/DungMan.glb
Normal file
BIN
assets/protodungman/DungMan.glb
Normal file
Binary file not shown.
1065
assets/protodungman/DungMan.glb.import
Normal file
1065
assets/protodungman/DungMan.glb.import
Normal file
File diff suppressed because it is too large
Load Diff
5
assets/protodungman/DungMan.tscn
Normal file
5
assets/protodungman/DungMan.tscn
Normal file
@ -0,0 +1,5 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://assets/protodungman/DungMan.glb" type="PackedScene" id=1]
|
||||
|
||||
[node name="DungMan" instance=ExtResource( 1 )]
|
BIN
assets/protodungman/Dung_Man.material
Normal file
BIN
assets/protodungman/Dung_Man.material
Normal file
Binary file not shown.
@ -1,10 +1,7 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/Player.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="CapsuleMesh" id=1]
|
||||
radius = 0.2
|
||||
mid_height = 0.85
|
||||
[ext_resource path="res://assets/protodungman/DungMan.glb" type="PackedScene" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape" id=2]
|
||||
radius = 0.210213
|
||||
@ -15,10 +12,7 @@ height = 0.85525
|
||||
[node name="Player" type="KinematicBody"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||
transform = Transform( 0.994286, 0, 0, 0, -4.34616e-08, -0.994286, 0, 0.994286, -4.34616e-08, 0, 0.666587, 0 )
|
||||
mesh = SubResource( 1 )
|
||||
skeleton = NodePath("../..")
|
||||
[node name="DungMan" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.641703, 0 )
|
||||
|
@ -11,7 +11,7 @@ func _ready():
|
||||
func _physics_process(delta):
|
||||
var input = Vector3(Input.get_axis("left", "right"), 0.0, Input.get_axis("up", "down"))
|
||||
var motion = Plane.PLANE_XZ.project(get_viewport().get_camera().global_transform.basis.xform(input)).normalized() * SPEED
|
||||
|
||||
$DungMan.look_at(global_transform.origin - motion, Vector3.UP)
|
||||
move_and_slide(motion)
|
||||
|
||||
func can_afford(item_name, item_amount):
|
||||
|
Loading…
x
Reference in New Issue
Block a user