train mode import and camera zoom update
This commit is contained in:
53
Blends/Train/Train.blend.import
Normal file
53
Blends/Train/Train.blend.import
Normal file
@@ -0,0 +1,53 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://rmccebiojtc6"
|
||||
path="res://.godot/imported/Train.blend-cf41dbf2c3ca99c012b2eb0df2dbf2c3.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Blends/Train/Train.blend"
|
||||
dest_files=["res://.godot/imported/Train.blend-cf41dbf2c3ca99c012b2eb0df2dbf2c3.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
@@ -9,8 +9,11 @@ extends Camera3D
|
||||
var debugLabel
|
||||
var global_delta
|
||||
var default_pos
|
||||
var zoom_pos
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
zoom_pos = 40
|
||||
default_pos = self.position
|
||||
debugLabel = $DebugLabel1
|
||||
particlesSystem.emitting = true
|
||||
@@ -22,7 +25,7 @@ func _process(delta: float) -> void:
|
||||
debugLabel.text = "Mode: " + str(Global.build_mode)
|
||||
global_delta = delta
|
||||
look_at(ownRigidBody.position)
|
||||
self.position.y = -0.1 * pow(self.position.z,2) + 40
|
||||
self.position.y = -0.1 * pow(self.position.z,2) + zoom_pos # y axis controll for camera
|
||||
if(Input.is_action_just_released("move_camera_enable")):
|
||||
ownRigidBody.angular_velocity = Vector3.ZERO
|
||||
if(Input.is_action_pressed("move_camera_enable")):
|
||||
@@ -32,12 +35,14 @@ func _process(delta: float) -> void:
|
||||
#ownRigidBody.angular_velocity.x = mouseV.y * delta / camera_speed
|
||||
#print(self.position.dot(ownRigidBody.position))
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
func _input(event: InputEvent) -> void: # zoom control
|
||||
if(event.is_action("camera_zoom")):
|
||||
if (event.as_text() == "Mouse Wheel Up"):
|
||||
self.position = self.position.lerp(Vector3.ZERO,global_delta * 5.0)
|
||||
#self.position = self.position.lerp(Vector3.ZERO,global_delta * 5.0)
|
||||
zoom_pos += global_delta * 45.0
|
||||
else:
|
||||
self.position = self.position.lerp(endZoom.position,global_delta * 5.0)
|
||||
#self.position = self.position.lerp(endZoom.position,global_delta * 5.0)
|
||||
zoom_pos -= global_delta * 45.0
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user