mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-24 00:04:20 +00:00
14 lines
374 B
C#
14 lines
374 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class AlignToGridContinuous : MonoBehaviour {
|
|||
|
|
|||
|
void Update () {
|
|||
|
float x = Mathf.Round(transform.position.x);
|
|||
|
float y = Mathf.Round(transform.position.y);
|
|||
|
float z = Mathf.Round(transform.position.z);
|
|||
|
transform.position = new Vector3(x, y, z);
|
|||
|
}
|
|||
|
}
|