Edit little platforms rigidbody

This commit is contained in:
haitem
2022-01-30 11:32:44 +01:00
parent 816b51b439
commit 37d93416a6
12 changed files with 181 additions and 4 deletions

View File

@@ -4,9 +4,16 @@ using UnityEngine;
public class BGRotation : MonoBehaviour
{
void Update()
private Vector3 rotation;
private void Start()
{
transform.Rotate(new Vector3(Random.Range(0,360), Random.Range(0, 360), Random.Range(0, 360)));
rotation = new Vector3(Random.Range(0, 360), Random.Range(0, 360), Random.Range(0, 360));
}
void FixedUpdate()
{
transform.Rotate(rotation);
}
private void OnTriggerEnter(Collider other)