Files
Fishing2/Assets/Scripts/Fishing/FixedLine.cs
2025-12-26 20:35:52 +08:00

33 lines
582 B
C#

using System;
using UnityEngine;
namespace NBF
{
public class FixedLine : MonoBehaviour
{
public Transform target;
private Rigidbody _rigidbody;
private void Awake()
{
_rigidbody = GetComponent<Rigidbody>();
}
private void LateUpdate()
{
// FixLine();
}
private void FixedUpdate()
{
FixLine();
}
private void FixLine()
{
if (!target) return;
_rigidbody.MovePosition(target.position);
}
}
}