Model and implement constructed and artificial speedpads
This commit is contained in:
		
							parent
							
								
									7428ad35b3
								
							
						
					
					
						commit
						19dedf862c
					
				
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -0,0 +1,53 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="scene"
 | 
			
		||||
importer_version=1
 | 
			
		||||
type="PackedScene"
 | 
			
		||||
uid="uid://dyfbuqjb1638w"
 | 
			
		||||
path="res://.godot/imported/speedpad_constructed.blend-380cbcf2513ed765d15b2c7ea9437719.scn"
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/props/speedpad_constructed.blend"
 | 
			
		||||
dest_files=["res://.godot/imported/speedpad_constructed.blend-380cbcf2513ed765d15b2c7ea9437719.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
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="texture"
 | 
			
		||||
type="CompressedTexture2D"
 | 
			
		||||
uid="uid://ch2sqjvy5xqp0"
 | 
			
		||||
path.s3tc="res://.godot/imported/Speedpad_AlbedoTexture.png-2e70f25f4860fefe73c541de73487c36.s3tc.ctex"
 | 
			
		||||
metadata={
 | 
			
		||||
"imported_formats": ["s3tc_bptc"],
 | 
			
		||||
"vram_texture": true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/props/textures/Speedpad_AlbedoTexture.png"
 | 
			
		||||
dest_files=["res://.godot/imported/Speedpad_AlbedoTexture.png-2e70f25f4860fefe73c541de73487c36.s3tc.ctex"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
compress/mode=2
 | 
			
		||||
compress/high_quality=false
 | 
			
		||||
compress/lossy_quality=0.7
 | 
			
		||||
compress/hdr_compression=1
 | 
			
		||||
compress/normal_map=0
 | 
			
		||||
compress/channel_pack=0
 | 
			
		||||
mipmaps/generate=true
 | 
			
		||||
mipmaps/limit=-1
 | 
			
		||||
roughness/mode=0
 | 
			
		||||
roughness/src_normal=""
 | 
			
		||||
process/fix_alpha_border=true
 | 
			
		||||
process/premult_alpha=false
 | 
			
		||||
process/normal_map_invert_y=false
 | 
			
		||||
process/hdr_as_srgb=false
 | 
			
		||||
process/hdr_clamp_exposure=false
 | 
			
		||||
process/size_limit=0
 | 
			
		||||
detect_3d/compress_to=0
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 81 KiB  | 
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="texture"
 | 
			
		||||
type="CompressedTexture2D"
 | 
			
		||||
uid="uid://b5abafsqsxpe5"
 | 
			
		||||
path.s3tc="res://.godot/imported/Speedpad_Constructed_AlbedoTexture.png-9d45f7cc63660e70b5fb62742070e172.s3tc.ctex"
 | 
			
		||||
metadata={
 | 
			
		||||
"imported_formats": ["s3tc_bptc"],
 | 
			
		||||
"vram_texture": true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/props/textures/Speedpad_Constructed_AlbedoTexture.png"
 | 
			
		||||
dest_files=["res://.godot/imported/Speedpad_Constructed_AlbedoTexture.png-9d45f7cc63660e70b5fb62742070e172.s3tc.ctex"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
compress/mode=2
 | 
			
		||||
compress/high_quality=false
 | 
			
		||||
compress/lossy_quality=0.7
 | 
			
		||||
compress/hdr_compression=1
 | 
			
		||||
compress/normal_map=0
 | 
			
		||||
compress/channel_pack=0
 | 
			
		||||
mipmaps/generate=true
 | 
			
		||||
mipmaps/limit=-1
 | 
			
		||||
roughness/mode=0
 | 
			
		||||
roughness/src_normal=""
 | 
			
		||||
process/fix_alpha_border=true
 | 
			
		||||
process/premult_alpha=false
 | 
			
		||||
process/normal_map_invert_y=false
 | 
			
		||||
process/hdr_as_srgb=false
 | 
			
		||||
process/hdr_clamp_exposure=false
 | 
			
		||||
process/size_limit=0
 | 
			
		||||
detect_3d/compress_to=0
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 58 KiB  | 
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="texture"
 | 
			
		||||
type="CompressedTexture2D"
 | 
			
		||||
uid="uid://dkvl0d1ax4lpb"
 | 
			
		||||
path.s3tc="res://.godot/imported/Speedpad_Constructed_RoughnessTexture.png-5e7ac4450a08bed22e38df7b96e06313.s3tc.ctex"
 | 
			
		||||
metadata={
 | 
			
		||||
"imported_formats": ["s3tc_bptc"],
 | 
			
		||||
"vram_texture": true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/props/textures/Speedpad_Constructed_RoughnessTexture.png"
 | 
			
		||||
dest_files=["res://.godot/imported/Speedpad_Constructed_RoughnessTexture.png-5e7ac4450a08bed22e38df7b96e06313.s3tc.ctex"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
compress/mode=2
 | 
			
		||||
compress/high_quality=false
 | 
			
		||||
compress/lossy_quality=0.7
 | 
			
		||||
compress/hdr_compression=1
 | 
			
		||||
compress/normal_map=0
 | 
			
		||||
compress/channel_pack=0
 | 
			
		||||
mipmaps/generate=true
 | 
			
		||||
mipmaps/limit=-1
 | 
			
		||||
roughness/mode=0
 | 
			
		||||
roughness/src_normal=""
 | 
			
		||||
process/fix_alpha_border=true
 | 
			
		||||
process/premult_alpha=false
 | 
			
		||||
process/normal_map_invert_y=false
 | 
			
		||||
process/hdr_as_srgb=false
 | 
			
		||||
process/hdr_clamp_exposure=false
 | 
			
		||||
process/size_limit=0
 | 
			
		||||
detect_3d/compress_to=0
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="texture"
 | 
			
		||||
type="CompressedTexture2D"
 | 
			
		||||
uid="uid://ctk2wr52knq8n"
 | 
			
		||||
path.s3tc="res://.godot/imported/Speedpad_EmissionTexture.png-b44f3ca220856e87af3bc57fefcf1369.s3tc.ctex"
 | 
			
		||||
metadata={
 | 
			
		||||
"imported_formats": ["s3tc_bptc"],
 | 
			
		||||
"vram_texture": true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/props/textures/Speedpad_EmissionTexture.png"
 | 
			
		||||
dest_files=["res://.godot/imported/Speedpad_EmissionTexture.png-b44f3ca220856e87af3bc57fefcf1369.s3tc.ctex"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
compress/mode=2
 | 
			
		||||
compress/high_quality=false
 | 
			
		||||
compress/lossy_quality=0.7
 | 
			
		||||
compress/hdr_compression=1
 | 
			
		||||
compress/normal_map=0
 | 
			
		||||
compress/channel_pack=0
 | 
			
		||||
mipmaps/generate=true
 | 
			
		||||
mipmaps/limit=-1
 | 
			
		||||
roughness/mode=0
 | 
			
		||||
roughness/src_normal=""
 | 
			
		||||
process/fix_alpha_border=true
 | 
			
		||||
process/premult_alpha=false
 | 
			
		||||
process/normal_map_invert_y=false
 | 
			
		||||
process/hdr_as_srgb=false
 | 
			
		||||
process/hdr_clamp_exposure=false
 | 
			
		||||
process/size_limit=0
 | 
			
		||||
detect_3d/compress_to=0
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="texture"
 | 
			
		||||
type="CompressedTexture2D"
 | 
			
		||||
uid="uid://dqlauxpfh2lxf"
 | 
			
		||||
path.s3tc="res://.godot/imported/Speedpad_MetallicityTexture.png-a90c4ee1a211bf7af196d563bd4f616b.s3tc.ctex"
 | 
			
		||||
metadata={
 | 
			
		||||
"imported_formats": ["s3tc_bptc"],
 | 
			
		||||
"vram_texture": true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/props/textures/Speedpad_MetallicityTexture.png"
 | 
			
		||||
dest_files=["res://.godot/imported/Speedpad_MetallicityTexture.png-a90c4ee1a211bf7af196d563bd4f616b.s3tc.ctex"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
compress/mode=2
 | 
			
		||||
compress/high_quality=false
 | 
			
		||||
compress/lossy_quality=0.7
 | 
			
		||||
compress/hdr_compression=1
 | 
			
		||||
compress/normal_map=0
 | 
			
		||||
compress/channel_pack=0
 | 
			
		||||
mipmaps/generate=true
 | 
			
		||||
mipmaps/limit=-1
 | 
			
		||||
roughness/mode=0
 | 
			
		||||
roughness/src_normal=""
 | 
			
		||||
process/fix_alpha_border=true
 | 
			
		||||
process/premult_alpha=false
 | 
			
		||||
process/normal_map_invert_y=false
 | 
			
		||||
process/hdr_as_srgb=false
 | 
			
		||||
process/hdr_clamp_exposure=false
 | 
			
		||||
process/size_limit=0
 | 
			
		||||
detect_3d/compress_to=0
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 39 KiB  | 
| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="texture"
 | 
			
		||||
type="CompressedTexture2D"
 | 
			
		||||
uid="uid://m6jbw2c08how"
 | 
			
		||||
path.s3tc="res://.godot/imported/Speedpad_RoughnessTexture.png-650fc2044c175aacb1c0cabf6d386624.s3tc.ctex"
 | 
			
		||||
metadata={
 | 
			
		||||
"imported_formats": ["s3tc_bptc"],
 | 
			
		||||
"vram_texture": true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://models/props/textures/Speedpad_RoughnessTexture.png"
 | 
			
		||||
dest_files=["res://.godot/imported/Speedpad_RoughnessTexture.png-650fc2044c175aacb1c0cabf6d386624.s3tc.ctex"]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
compress/mode=2
 | 
			
		||||
compress/high_quality=false
 | 
			
		||||
compress/lossy_quality=0.7
 | 
			
		||||
compress/hdr_compression=1
 | 
			
		||||
compress/normal_map=0
 | 
			
		||||
compress/channel_pack=0
 | 
			
		||||
mipmaps/generate=true
 | 
			
		||||
mipmaps/limit=-1
 | 
			
		||||
roughness/mode=0
 | 
			
		||||
roughness/src_normal=""
 | 
			
		||||
process/fix_alpha_border=true
 | 
			
		||||
process/premult_alpha=false
 | 
			
		||||
process/normal_map_invert_y=false
 | 
			
		||||
process/hdr_as_srgb=false
 | 
			
		||||
process/hdr_clamp_exposure=false
 | 
			
		||||
process/size_limit=0
 | 
			
		||||
detect_3d/compress_to=0
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
class_name Speedpad extends Area3D
 | 
			
		||||
 | 
			
		||||
@export var speed_boost: float = 20.0
 | 
			
		||||
@export var audio_player: AudioStreamPlayer3D
 | 
			
		||||
 | 
			
		||||
func _ready() -> void:
 | 
			
		||||
	body_entered.connect(_on_body_entered)
 | 
			
		||||
 | 
			
		||||
func _on_body_entered(body: PhysicsBody3D) -> void:
 | 
			
		||||
	var rbody := body as RigidBody3D
 | 
			
		||||
	if rbody:
 | 
			
		||||
		var dir := -global_basis.z.normalized()
 | 
			
		||||
		rbody.apply_central_impulse(rbody.mass*speed_boost*dir)
 | 
			
		||||
		audio_player.play()
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
uid://cbcugywj0f3uw
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
[gd_scene load_steps=5 format=3 uid="uid://ddga068u8m4i3"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://gcbe3ih1fv75" path="res://props/speedpad_artificial.gd" id="1_flbj4"]
 | 
			
		||||
[ext_resource type="AudioStream" uid="uid://b62clfgatxgll" path="res://audio/whoosh.ogg" id="2_2i4vf"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://1w7b3o3qasi3" path="res://models/props/speedpad.blend" id="3_nl8my"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_2i4vf"]
 | 
			
		||||
size = Vector3(0.75, 0.125, 1)
 | 
			
		||||
 | 
			
		||||
[node name="Speedpad" type="Area3D" node_paths=PackedStringArray("model", "audio_player")]
 | 
			
		||||
script = ExtResource("1_flbj4")
 | 
			
		||||
model = NodePath("speedpad/Speedpad")
 | 
			
		||||
audio_player = NodePath("AudioStreamPlayer3D")
 | 
			
		||||
metadata/_custom_type_script = "uid://gcbe3ih1fv75"
 | 
			
		||||
 | 
			
		||||
[node name="speedpad" parent="." instance=ExtResource("3_nl8my")]
 | 
			
		||||
 | 
			
		||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
 | 
			
		||||
stream = ExtResource("2_2i4vf")
 | 
			
		||||
bus = &"Sound Effects"
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
shape = SubResource("BoxShape3D_2i4vf")
 | 
			
		||||
 | 
			
		||||
[editable path="speedpad"]
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,58 @@
 | 
			
		|||
class_name SpeedpadArtificial extends Speedpad
 | 
			
		||||
 | 
			
		||||
@export var model: MeshInstance3D
 | 
			
		||||
 | 
			
		||||
@onready var _sk1: int = model.find_blend_shape_by_name(&'Key 1')
 | 
			
		||||
@onready var _sk2: int = model.find_blend_shape_by_name(&'Key 2')
 | 
			
		||||
@onready var _sk3: int = model.find_blend_shape_by_name(&'Key 3')
 | 
			
		||||
@onready var _sk4: int = model.find_blend_shape_by_name(&'Key 4')
 | 
			
		||||
@onready var _sk5: int = model.find_blend_shape_by_name(&'Key 5')
 | 
			
		||||
@onready var _sk6: int = model.find_blend_shape_by_name(&'Key 6')
 | 
			
		||||
 | 
			
		||||
var _anim_progress: float = 0.0
 | 
			
		||||
 | 
			
		||||
func _process(delta: float) -> void:
 | 
			
		||||
	_anim_progress = fposmod(_anim_progress + speed_boost*delta/4.0, 6.0)
 | 
			
		||||
	var _subprogress: float = fposmod(_anim_progress, 1.0)
 | 
			
		||||
	if _anim_progress <= 1.0:
 | 
			
		||||
		model.set_blend_shape_value(_sk1, _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk2, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk3, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk4, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk5, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk6, 1.0 - _subprogress)
 | 
			
		||||
	elif _anim_progress <= 2.0:
 | 
			
		||||
		model.set_blend_shape_value(_sk1, 1.0 - _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk2, _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk3, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk4, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk5, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk6, 0.0)
 | 
			
		||||
	elif _anim_progress <= 3.0:
 | 
			
		||||
		model.set_blend_shape_value(_sk1, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk2, 1.0 - _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk3, _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk4, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk5, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk6, 0.0)
 | 
			
		||||
	elif _anim_progress <= 4.0:
 | 
			
		||||
		model.set_blend_shape_value(_sk1, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk2, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk3, 1.0 - _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk4, _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk5, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk6, 0.0)
 | 
			
		||||
	elif _anim_progress <= 5.0:
 | 
			
		||||
		model.set_blend_shape_value(_sk1, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk2, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk3, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk4, 1.0 - _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk5, _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk6, 0.0)
 | 
			
		||||
	else:
 | 
			
		||||
		model.set_blend_shape_value(_sk1, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk2, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk3, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk4, 0.0)
 | 
			
		||||
		model.set_blend_shape_value(_sk5, 1.0 - _subprogress)
 | 
			
		||||
		model.set_blend_shape_value(_sk6, _subprogress)
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
uid://gcbe3ih1fv75
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
class_name SpeedpadConstructed extends Speedpad
 | 
			
		||||
 | 
			
		||||
@export var model: MeshInstance3D
 | 
			
		||||
 | 
			
		||||
@onready var _sk: int = model.find_blend_shape_by_name(&'whoosh')
 | 
			
		||||
 | 
			
		||||
var _up := false
 | 
			
		||||
 | 
			
		||||
var _sk_val: float:
 | 
			
		||||
	get():
 | 
			
		||||
		return model.get_blend_shape_value(_sk)
 | 
			
		||||
	set(value):
 | 
			
		||||
		model.set_blend_shape_value(_sk, value)
 | 
			
		||||
 | 
			
		||||
func _on_body_entered(body: PhysicsBody3D) -> void:
 | 
			
		||||
	super(body)
 | 
			
		||||
	if body is RigidBody3D:
 | 
			
		||||
		_up = true
 | 
			
		||||
 | 
			
		||||
func _process(delta: float) -> void:
 | 
			
		||||
	if _up:
 | 
			
		||||
		_sk_val = lerp(_sk_val, 1.0, 1.0 - 0.00001**delta)
 | 
			
		||||
		if abs(_sk_val - 1.0) < 0.001:
 | 
			
		||||
			_up = false
 | 
			
		||||
	else:
 | 
			
		||||
		_sk_val = lerp(_sk_val, 0.0, 1.0 - 0.1**delta)
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
uid://ddjca7kk2m72u
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
[gd_scene load_steps=5 format=3 uid="uid://img70a34s4vc"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://ddjca7kk2m72u" path="res://props/speedpad_constructed.gd" id="1_gimm5"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dyfbuqjb1638w" path="res://models/props/speedpad_constructed.blend" id="2_gtv45"]
 | 
			
		||||
[ext_resource type="AudioStream" uid="uid://b62clfgatxgll" path="res://audio/whoosh.ogg" id="3_3p31n"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="BoxShape3D" id="BoxShape3D_wrik4"]
 | 
			
		||||
size = Vector3(0.75, 0.125, 0.538269)
 | 
			
		||||
 | 
			
		||||
[node name="SpeedpadConstructed" type="Area3D" node_paths=PackedStringArray("model", "audio_player")]
 | 
			
		||||
script = ExtResource("1_gimm5")
 | 
			
		||||
model = NodePath("speedpad_constructed/Twig")
 | 
			
		||||
audio_player = NodePath("AudioStreamPlayer3D")
 | 
			
		||||
metadata/_custom_type_script = "uid://ddjca7kk2m72u"
 | 
			
		||||
 | 
			
		||||
[node name="speedpad_constructed" parent="." instance=ExtResource("2_gtv45")]
 | 
			
		||||
 | 
			
		||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
 | 
			
		||||
stream = ExtResource("3_3p31n")
 | 
			
		||||
bus = &"Sound Effects"
 | 
			
		||||
 | 
			
		||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.489655)
 | 
			
		||||
shape = SubResource("BoxShape3D_wrik4")
 | 
			
		||||
 | 
			
		||||
[editable path="speedpad_constructed"]
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
[gd_scene load_steps=16 format=3 uid="uid://6wjqqijnie4p"]
 | 
			
		||||
[gd_scene load_steps=18 format=3 uid="uid://6wjqqijnie4p"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" uid="uid://cmoaplk7fly6y" path="res://vfx/gameplay_camera.gd" id="1_qjty2"]
 | 
			
		||||
[ext_resource type="Texture2D" uid="uid://b334g66yuhwtv" path="res://vfx/textures/skybox1.png" id="2_p5rwy"]
 | 
			
		||||
| 
						 | 
				
			
			@ -9,6 +9,8 @@
 | 
			
		|||
[ext_resource type="PackedScene" uid="uid://b7mqd4ps8e3uj" path="res://props/springboard_constructed.tscn" id="9_4tub8"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://16os114krms3" path="res://characters/controllers/player_character_controller.gd" id="9_j70wf"]
 | 
			
		||||
[ext_resource type="Script" uid="uid://dotkfe7cs5010" path="res://test/pick_up_item.gd" id="10_ld4ib"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://ddga068u8m4i3" path="res://props/speedpad.tscn" id="10_qjty2"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://img70a34s4vc" path="res://props/speedpad_constructed.tscn" id="11_vhybo"]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_sj3fr"]
 | 
			
		||||
panorama = ExtResource("2_p5rwy")
 | 
			
		||||
| 
						 | 
				
			
			@ -88,4 +90,10 @@ transform = Transform3D(0.555329, -0.584704, 0.59138, 0.725086, 0.688658, 0, -0.
 | 
			
		|||
[node name="Springboard4" parent="." instance=ExtResource("8_p5rwy")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.3396, 6.38962e-05, 2.86398)
 | 
			
		||||
 | 
			
		||||
[node name="Speedpad" parent="." instance=ExtResource("10_qjty2")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.1043, 0.0802538, 15.8815)
 | 
			
		||||
 | 
			
		||||
[node name="SpeedpadConstructed" parent="." instance=ExtResource("11_vhybo")]
 | 
			
		||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26.2941, 0.0469744, 10.3884)
 | 
			
		||||
 | 
			
		||||
[editable path="StaticBody3D/blender_test_map"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue