I am using third person player and my camera is also third person .Now i want to rotate camera when my mouse cursor rotate. I could not find any way pls help me to rotate this.
Update:- How to rotate camera and player using mouse cursor
Hi
I am using third person player and my camera is also third person .Now i want to rotate camera and player together when my mouse cursor rotate. I could not find any way pls help me to rotate this.
You have to unlock your Spin and Pitch rotation axes, and supply the names of mouse axes defined in your Input Manager.
Here is a set up that works well for me:
Notice the list of required inputs below: you will have to make sure that mouse X and Y inputs with these names exist in your Input Manager (by detault, these may be called "Mouse X" and "Mouse Y" already for you).
The screenshot and description I just posted does exactly that. See Unity's manual on the Input manager for more on mapping your CursorHorizontal / CursorVertical inputs to the mouse movement.
I have already fixed that and My mouse cursor rotate smoothly. But my third person player could not rotate with my mouse cursor rotation(Just Like unity 4.6 standard asset Third person controller head move with his mouse cursor).pls help me . I have made a custom player with this Tutorial.
Have a look at the scripting guide, specifically the Char class. There is a SetRotation function that you can call in your custom controller script to rotate the player to a fixed angle. If you need help with scripting in general, then I would recommend asking on the Unity forums.
Comments
Here is a set up that works well for me:
Notice the list of required inputs below: you will have to make sure that mouse X and Y inputs with these names exist in your Input Manager (by detault, these may be called "Mouse X" and "Mouse Y" already for you).