This commit is contained in:
haitem
2022-01-29 16:44:46 +01:00
13 changed files with 2913 additions and 1563 deletions

View File

@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CirclePlatformGenerator : MonoBehaviour
{
public Object objectToCopy;
// Start is called before the first frame update
void Start()
{
int pieceCount = 10;
float angle = 360f / (float)pieceCount;
// var axis = transform.RotateAround(axis, angle * Time.deltaTime * 5f);
for (int i = 0; i < pieceCount; i++)
{
Quaternion rotation = Quaternion.AngleAxis(i * angle, Vector3.forward);
Vector3 direction = rotation * Vector3.forward;
Vector3 position = transform.position + (direction * 20);
Instantiate(this.objectToCopy, Vector3.zero, rotation);
}
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0418fbcc3e28fec4696b40ecbbf51c7e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: