ブログ

(Unity)オブジェクトを渦巻き状に動かす


<スクリプト>

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Uzumaki : MonoBehaviour
{
    public Vector3 center;

    void Update()
    {
        transform.RotateAround(center, Vector3.up, 100 * Time.deltaTime);
        transform.Translate(0.01f, 0, 0);
    }
}