非父子物体保持相对静止
- 🍔效果
- 🥪食用
🍔效果
保持两个非父子关系的物体坐标、旋转相对静止
🥪食用
插件下载
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ZYF
{
public class KeepRelativeRestDemo : MonoBehaviour
{
public GameObject asChild;
public GameObject asParent;
private void OnEnable()
{
asChild.AddKeepRelativeRestBind(asParent);
}
private void OnDisable()
{
asChild.RemoveKeepRelativeRestBind();
}
}
}