Trying to make a smoothly rotating and moving camera
using UnityEngine; public class CameraFollow : MonoBehaviour { public Transform target; public float smoothingspeed_movement = 0.125f; public float smoothingspeed_rotation= 0.5f; public Vector3 offset; void FixedUpdate () { Vector3 desiredPosition = target.position + offset; Vector3 smoothedPosition = Vector3.Lerp(transform.position, desiredPosition, smoothingspeed_movement); transform.position = smoothedPosition; Vector3 desiredRotation = target.eulerAngles + offset; Vector3 smoothedRotation = Vector3.Lerp(transform.rotation.eulerAngles, desiredRotation, smoothingspeed_rotation); transform.eulerAngles […]
error CS1503: Argument 1: cannot convert from ‘UnityEngine.Vector2’ to ‘float’
I am kinda new to programming, and was following a yt tutorial for 2d movement in Unity. But it returns this error. I am not sure what’s wrong. I am kind of especially lost when it comes to Vectors, so any insight would be great lol. Thanks in advance
unity cant change transform.position with vector
I cant teleport my character with vector3 . it doesn’t changesa and
Find the center of a circle from two Vector in Unity
I’d like to know if there’s a formula for finding the center of a circle from two vectors.