add custom cursor
This commit is contained in:
@@ -4,7 +4,8 @@ extends Camera3D
|
||||
@export var _height_offset: float = 0.5
|
||||
@export var _distance: float = 50
|
||||
@export var _angle_degrees: Vector3 = Vector3(-35, -45, 0)
|
||||
@export var _aim_offset_factor: float = 0.2
|
||||
@export var _aim_offset_factor_mouse: float = 0.2
|
||||
@export var _aim_offset_factor_controller: float = 0.5
|
||||
@export var _aim_damping: float = 1
|
||||
|
||||
var _floor_height: float = 0
|
||||
@@ -35,7 +36,17 @@ func _follow(delta: float) -> void:
|
||||
)
|
||||
_aim_offset = _aim_offset.lerp(new_aim_offset, _aim_damping * delta)
|
||||
|
||||
var follow_position := player_position + _aim_offset * _aim_offset_factor
|
||||
var follow_position := (
|
||||
player_position
|
||||
+ (
|
||||
_aim_offset
|
||||
* (
|
||||
_aim_offset_factor_mouse
|
||||
if Inputer.mode == Inputer.Mode.KB_MOUSE
|
||||
else _aim_offset_factor_controller
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
global_rotation_degrees = _angle_degrees
|
||||
global_position = (
|
||||
|
||||
Reference in New Issue
Block a user