Unity C# : Free Look Camera Control Part 1 : Rotation on Mobile Devices

preview_player
Показать описание
This tutorial covers how to rotate the Free Look camera on mobile devices.
This tutorial will be useful especially for those who need to rotate the camera when using the virtual joystick on a mobile device.

You will learn about :
00:00 intro
00:43 Principle and Plan
02:27 Setup
03:23 Basic UI Image Handler
06:07 Rotating Camera
08:14 Problem Solving 1
09:49 Problem Solving 2
10:41 Result and Next Tutorial plan
Рекомендации по теме
Комментарии
Автор

Hi, I recently discovered your channel and watched few of your videos, they are very simple and easy to understand, please keep making good videos. <3

mkak
Автор

Wow! Thanks a lot. When another part ? :0

rissoilo
Автор

Sensacional o canal! Meus parabéns 👏 Me ajudou muito ❤

lucasramos
Автор

Congratulations on the channel! I have a question, does this work with Third Person Standard Asset (the latest one that comes with New Input)? I ask about this, because I have a problem that I don't know what else to do, in all xiaomis my virtual look input rotates the cameras perfectly, however, in samsungs it rotates super fast. Thanks!

ErenBR
Автор

Hello thank you for tutorial. I have a problem. I am using Unity starter assets with a third person character combined your script. The problem is when i move my joystick to the forward and even i change the rotation of camera, my character is not moving the same rotation with camera. Can you help me please?

egeorcun
Автор

Hello! Your tutorials are excellent and I have been following them starting from Character Animation Setup up to this video and everything works perfectly but I have encountered a same problem another person had where the camera rotation works when moving with the mouse but when I try to run it in my phone both the touch and the mouse input stop working, I tried it via my phone using Unity Remote and also build the game and install on phone but still same. Any idea how to fix? Appreciate the help!

xperia
Автор

Great content, but it has some issues when trying to control the camera and move at the same time which is a natural thing to do in mobile game. Having both figures on screen cause the camera to be confused between which to follow which makes weird behavior.

wafikdidi
Автор

Hi! great tutorial... thank you! but I have a problem... everything works fine with mouse and pc but when I used unity remote, it didn't work with touch. am I mmissing something here? I used xiaomi 11t Pro. unity 2021.3.29...

rehyotaku
Автор

how about cinemachine freelook that uses the new input system, since it doesnt have field for axis name? how can you fix its unwanted rotation

yours_indie_game_dev
Автор

when a write "out Vector2" it gives me an error: "Assets/scripts/Cameracontrol.cs(21, 8): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 4.0 language specification" pls help ;(


edit: don´t worry i have just got the solution.
it was because i have an older version of unity, to fix that.
you need to create the var out of the conditional.
like this:

" *Vector2 posOut;*
if
imgCamControlArea.rectTransform,
eventData.position,
eventData.enterEventCamera,
out posOut))"

hyingplantilina
Автор

I try the script, it works perfectly by using mouse clicking to rotate camera. But when i try to test on mobile, it doesn’t work. Is it missing any script to receive touch value and change it into strMouseX and strMouseY?

amuroray