Insanely huge initial commit

This commit is contained in:
2026-02-21 16:40:15 -08:00
parent 208d626100
commit f74c547a13
33825 changed files with 5213498 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using UnityEngine;
using System.Collections;
namespace Com.LuisPedroFonseca.ProCamera2D.TopDownShooter
{
public class RotateTowardsMouse : MonoBehaviour
{
public float Ease = .15f;
Transform _transform;
void Awake()
{
_transform = transform;
}
void Update()
{
var mouse = Input.mousePosition;
var screenPoint = Camera.main.WorldToScreenPoint(_transform.localPosition);
var offset = new Vector2(mouse.x - screenPoint.x, mouse.y - screenPoint.y);
var angle = Mathf.Atan2(offset.y, offset.x) * Mathf.Rad2Deg;
_transform.rotation = Quaternion.Slerp(_transform.rotation, Quaternion.Euler(0, -angle, 0), Ease);
}
}
}