Free Look (Scene View Like) Camera for Play Mode in Unity
Автор: Feed My Kids
Загружено: 2020-07-25
Просмотров: 6376
Описание:
How to create a "Play Mode" camera that does the same things as the "Scene View" camera in Unity.
This Camera will be useful for inspecting a scene in Play mode and it's a decent controller for Building or RTS games.
Go directly to the code here because the video is already outdated (I've added 'flat' movement, the ability to turn off double click focusing - undo double click focusing, and changed some other values.
https://github.com/KampinKarl1/Scene-...
If you've ever wanted to create a camera similar to or exactly like the Scene View camera in the Unity3D game engine, this video is for you. You can use this camera to quickly navigate a scene in Play Mode using the same actions as Scene View and including a double click to focus an object.
Using Microsoft Visual Studio 2019 and C# in a basic 3D Unity project, I detail how to create a Scene-View Like Camera.
Go line by line to see how it's made in a total of only 110 lines of code (with plenty of whitespace).
The script only needs to be placed on your scene's camera. Your camera should not be parented to any other objects and shouldn't have other camera controllers on it (to prevent conflicting actions).
This controller is completely modular. It only accesses properties on the MonoBehaviour from which it inherits.
Icon for thumbnail from flaticon.com "Essentials" pack by Smashicon (free with signup):
https://www.flaticon.com/packs/essent...
Code for this Camera:
https://github.com/KampinKarl1/Scene-...
MyTwitter:
/ feedmykids1
0:00 Start
0:39 Scene Setup
1:30 Basic Camera Controller Script
2:00 KeyCode Setup
3:40 WASD Movement
5:52 How the Camera Moves
6:27 Anchored Movement (moving by holding middle mouse)
10:04 Anchored Rotation (rotating by holding right mouse)
13:10 Zoom with Scroll Wheel
15:07 Double Click to Focus Object
18:25 Demonstration of Desired Action
18:40 Getting the Double Clicked Object
20:30 Rotating Camera to Look at Focused Object
21:40 Focus Object Based on Size
24:50 Demonstration of Focus Object
Scene-View Camera Unity, How to make a scene view camera in play mode unity, is there a play mode camera like the scene view camera in unity.
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: