15 lines
465 B
C#
15 lines
465 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PositionSync : MonoBehaviour
|
|
{
|
|
public GameObject targetGameobject;
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
transform.rotation = targetGameobject.transform.rotation;
|
|
transform.position = new Vector3(targetGameobject.transform.position.x, targetGameobject.transform.position.y + 0f, targetGameobject.transform.position.z);
|
|
}
|
|
}
|