using UnityEngine;
using System.Collections;
public class shadows : MonoBehaviour {
public Transform entity;
public float rotate_entityX = 0;
void Start () {
}
// Update
void Update () {
var ObjectPos = entity.position;
ObjectPos.y = 0;
transform.position = ObjectPos;
var ObjectRot = entity.rotation;
ObjectRot.x = rotate_entityX;
transform.rotation = ObjectRot;
}
}
почему то он не хочет крутится с помощью rotation!
как по другому можно сделать.?