adjust hitting angles

This commit is contained in:
Teatov 2025-02-27 23:09:33 +10:00
parent 53e444a568
commit d831af27e1

View File

@ -16,7 +16,7 @@ enum Side { RIGHT, LEFT }
@export_group("Hits")
@export var _hit_projectile_speed: float = 35
@export var _direction_angles: Dictionary = {0.0: 0.0, PI: PI / 2.0}
@export var _direction_angles: Dictionary = {-PI / 15: 0.0, PI: PI / 2.0}
var side := Side.RIGHT
@ -74,7 +74,12 @@ func _process(delta: float) -> void:
global_position,
(
global_position
+ global_basis.z.rotated(Vector3.UP, dir_angle) * attack_radius
+ (
global_basis.z.rotated(
Vector3.UP, dir_angle * (-1.0 if side == Side.LEFT else 1.0)
)
* attack_radius
)
),
Color.BLUE
)