Godot Version
4.2.2
Question
`Hi, today I decided to set up a pixel-art shader for my top-down shooter, and moved the entire scene to the SubViewportContainer. I increased the Stretch Shrink, as a result of which my raycast script broke, and the character follows the cursor by a maximum of 45 degrees. I’m wondering if there is an “easy” way to make the character turn towards the cursor with these nuances, thanks
At the moment, I have also deleted any code related to the character’s rotation, and I only have this camera code:
@export var target : Node3D
@export var offset : Vector3 = Vector3(0, 0, 0)
@export var smooth_speed : float = 5.0
func _physics_process(delta: float) -> void:
if(target != null):
var target_position = lerp(self.position, target.position + offset, smooth_speed * delta)
self.position.x = target_position.x
self.position.z = target_position.z