You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/D2D_Scripts/Gameplay/RotationIgnorer.cs

25 lines
509 B
C#

using System;
using UnityEngine;
namespace D2D
{
public class RotationIgnorer : MonoBehaviour
{
private Transform _target;
private Vector3 _originalSwift;
private void Start()
{
_originalSwift = transform.localPosition;
_target = transform.parent;
transform.parent = null;
}
private void Update()
{
transform.position = _originalSwift + _target.position;
}
}
}