3rd area:
when this area hits the character, if the character is inside that area, it takes damage.
This picture always looks towards the camera.
This is an important system for optimizing and values can be changed in the editor.
#on "assests/script/death.gd" :
func death_envs(delta):
if env.dof_blur_far_amount < death_env_blur_amount:
env.dof_blur_far_amount += delta * 0.01
if env.adjustment_saturation > death_env_saturation:
env.adjustment_saturation -= delta * 0.6
if env.adjustment_brightness > death_env_brightness:
env.adjustment_brightness -= delta * 0.1
When the mouse is rotated, actions take place on the dummy pivot.
#on "assests/script/player_movement.gd" :
if event is InputEventMouseMotion && Input.get_mouse_mode() != 0 and $ui.game:
var resultant = sqrt((event.relative.x * event.relative.x )+ (event.relative.y * event.relative.y ))
var rot = Vector3(-event.relative.y,-event.relative.x,0).normalized()
puppet_pivot.rotate_object_local(rot , resultant * mouse_sensivity)
puppet_pivot.rotation.z = clamp(puppet_pivot.rotation.z,deg2rad(-0),deg2rad(0))
puppet_pivot.rotation.x = clamp(puppet_pivot.rotation.x,deg2rad(-30),deg2rad(30))
func _physics_process(delta):
if $ui.game:
#pivot.rotation.z = lerp_angle(pivot.rotation.z, puppet_pivot.rotation.z ,delta * 10)
pivot.rotation.x = lerp_angle(pivot.rotation.x, puppet_pivot.rotation.x ,delta * 10)
pivot.rotation.y = lerp_angle(pivot.rotation.y, puppet_pivot.rotation.y ,delta * 10)
#pivot.rotation = pivot.rotation.linear_interpolate(puppet_pivot.rotation,delta * 10)
pivot.global_transform.origin = pivot.global_transform.origin.linear_interpolate(character.get_node("RemotePivot").global_transform.origin,delta *2)
https://github.com/Zylann/godot_scatter_plugin
https://github.com/Zylann/godot_heightmap_plugin
https://github.com/Arnklit/Waterways