Added placeholder Handgun model to Player

pull/50/head
unfa 2021-05-31 23:34:26 +02:00
parent 7813108c99
commit 45023bf095
4 changed files with 1628 additions and 3 deletions

View File

@ -23,7 +23,6 @@ extends KinematicBody3D
@onready var climb_check_y = climb_check.translation.y
@onready var ground_check_y = ground_check.translation.y
var base_fov = 90
var view_zoom := 1.0 :
set(zoom):
@ -158,8 +157,8 @@ func _physics_process(delta):
var step = climb_check.get_collision_point().y
var start = global_transform.origin.y
# print("step: ", step, " start: ", start)
global_transform.origin.y += climb_height * climb_state * 2
climb_state = clamp((step - start) / climb_height, 0, 1)
global_transform.origin.y += climb_height * climb_state
#print("climb state to start: ", climb_state)
# print("Climb height: ", step - start, " Climb state: ", climb_state)
climb_tween.remove_all()

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=6 format=2]
[ext_resource path="res://Assets/Characters/Player.gd" type="Script" id=1]
[ext_resource path="res://Assets/Weapons/Handgun/Handgun.gltf" type="PackedScene" id=2]
[sub_resource type="CapsuleMesh" id=1]
radius = 0.4
@ -37,8 +38,11 @@ script = null
script = null
[node name="Hand" type="Node3D" parent="Head/Camera"]
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.3, -0.4, -0.6 )
script = null
[node name="Handgun" parent="Head/Camera/Hand" instance=ExtResource( 2 )]
[node name="Tween" type="Tween" parent="Head/Camera"]
script = null

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,28 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
path="res://.godot/imported/Handgun.gltf-dfc6de5a6d72ba5ef43f43a4cd2ab91e.scn"
[deps]
source_file="res://Assets/Weapons/Handgun/Handgun.gltf"
dest_files=[ "res://.godot/imported/Handgun.gltf-dfc6de5a6d72ba5ef43f43a4cd2ab91e.scn" ]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=2
meshes/lightmap_texel_size=0.1
skins/use_named_skins=true
animation/import=true
animation/fps=15
import_script/path=""
_subresources={
}