tweak speed and angles
This commit is contained in:
parent
2322d8ff62
commit
cc5f2acc17
@ -14,7 +14,7 @@ height = 0.635
|
|||||||
script = ExtResource("1_fdaky")
|
script = ExtResource("1_fdaky")
|
||||||
_spawn_point = NodePath("Marker3D")
|
_spawn_point = NodePath("Marker3D")
|
||||||
_projectile_scene = ExtResource("2_p0btw")
|
_projectile_scene = ExtResource("2_p0btw")
|
||||||
_velocity = Vector3(0, 0, -5)
|
_velocity = Vector3(0, 0, -10)
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||||
|
|||||||
@ -17,7 +17,7 @@ enum Side { RIGHT, LEFT }
|
|||||||
|
|
||||||
@export_group("Hits")
|
@export_group("Hits")
|
||||||
@export var _hit_projectile_speed: float = 35
|
@export var _hit_projectile_speed: float = 35
|
||||||
@export var _direction_angles: Dictionary = {-PI / 6: 0, PI / 6: PI / 4, PI: PI / 2}
|
@export var _direction_angles: Dictionary = {-PI / 8: 0, PI / 8: PI / 4, PI: PI / 2}
|
||||||
|
|
||||||
var side := Side.RIGHT
|
var side := Side.RIGHT
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ func _process(delta: float) -> void:
|
|||||||
+ global_basis.z.rotated(Vector3.UP, -_attack_max_angle) * _attack_radius
|
+ global_basis.z.rotated(Vector3.UP, -_attack_max_angle) * _attack_radius
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
for dir_angle: float in _direction_angles:
|
for dir_angle: float in _direction_angles.keys():
|
||||||
Debugger.line(
|
Debugger.line(
|
||||||
"fghdh3" + str(dir_angle),
|
"fghdh3" + str(dir_angle),
|
||||||
global_position,
|
global_position,
|
||||||
|
|||||||
@ -38,6 +38,7 @@ func init(velocity: Vector3, start_position: Vector3, lifetime: float = 10) -> v
|
|||||||
|
|
||||||
func set_velocity(velocity: Vector3) -> void:
|
func set_velocity(velocity: Vector3) -> void:
|
||||||
_velocity = velocity
|
_velocity = velocity
|
||||||
|
_life_timer = _lifetime
|
||||||
|
|
||||||
|
|
||||||
func _on_body_entered(node: Node3D) -> void:
|
func _on_body_entered(node: Node3D) -> void:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user