Is sense where it cuts off. from point_current to hit.position.
Yes I can decrease
@export var trail_point_density := 0.05 , which will increase points_count.
That makes sense, which would be updated by camera_root.is_aiming.
the target project using currently this logic, which I’m looking if I should keep it or reduce it to only camera length, or collision point.
( it’s from Full Code for Rick O'Shea Released )
func _physics_process(_delta: float) -> void:
if Input.is_action_just_pressed(GameConstants.INPUT_SHOOT):
if not camera_root.is_aiming:
return
var target: Vector3
if ray_cast_3d.is_colliding():
target = ray_cast_3d.get_collision_point()
print("Use Collision Point")
else:
var camera: Camera3D = ray_cast_3d.get_parent()
target = camera.global_position + (-camera.global_transform.basis.z * 1000)
print("Use camera length")
var bullet: Bullet = bullet_scene.instantiate()
Game.current_level.add_child(bullet)
bullet.global_transform = muzzle.global_transform
bullet.look_at(target, Vector3.UP)
bullet.fire_at(target)