Hello,
My Question is simple
I would like move my character with mouse smoothly
I used this code: its works but not smooth at all
void FixedUpdate()
{
float HorizontalAxis = Input.GetAxis("Mouse X");
float VerticalAxis = Input.GetAxis("Mouse Y");
Vector3 movement = new Vector3(HorizontalAxis, VerticalAxis, 0.0f);
rigidbody.velocity = movement * speed;
}
I used Mouse X and Y because Horizontal and Vertical Axis doesn’t work with me, I don’t know Why…
About the way, I am new to unity scripting,m I hope found some one help me with this
Thats what I want to do: Move object or player with mouse ( 2D Game) only X and Y values should be edited
best regards