private void LateUpdate() { Vector3 character_position = main_character.forward; Vector3 controller_position = main_controller.forward; Vector3 crosshair_up = Bearing.repeller(controller_position, character_position); crosshair_renderer.angle = Vector3.SignedAngle(main_controller.up, crosshair_up, main_controller.forward) * Mathf.Deg2Rad; crosshair_renderer.scale = Mathf.Lerp(0, crosshair_size, DebrisNoirsInput.get_axes().magnitude); }
private void LateUpdate() { Vector3 character_position = main_character.forward; Vector3 controller_position = main_controller.forward; Vector3 crosshair_up = Bearing.repeller(controller_position, character_position); crosshair_renderer.angle = Vector3.SignedAngle(main_controller.up, crosshair_up, main_controller.forward) * Mathf.Deg2Rad; crosshair_renderer.scale = Mathf.Lerp(crosshair_size / 2, crosshair_size, satellite.acceleration_direction().magnitude); }