Edit little platforms rigidbody

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

No files matched your search

+9 -2
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)