Dual stick shooter controls??

Hello, currently i’m making a kind of “dual-stick shooter” which will later resemble boxhead 2 - a popular web-game. I got my character to correctly although the rotation is missing. I move the character with w;a;s;d and want him to rotate and look at where my mouse is on screen.

How can i make the rotation part??

If you have any ideas, scripts or tutorial sugestions please leave them here :slight_smile:

Something like this should work in update() or fixedupdate(), You could get fancy and add in smoothing. (I didnt test this, and it MAY rotate your character in undesired angles so it may need tweaking)

    RaycastHit hitinfo;
    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); // casts a ray from the center of the camer to the mouse pointer
    if (Physics.Raycast(ray, out hitinfo)) // stores the collision info of the raycast
    {
        transform.LookAt(hitinfo.point); // look at the point of space you hit
    }