Тёмный

3D Camera Rotation for First Person and Third Person Games (Godot Tutorial) 

Martin Senges
Подписаться 2,6 тыс.
Просмотров 7 тыс.
50% 1

In this video, I'll explain how to perform both camera rotation in first person and third person view.
website: martin-senges.eu/

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@gaisericg9984
@gaisericg9984 2 года назад
Excellent, the break down on the math for how the radius is calculated was very appreciated as well. Never a fan of copy what I do and don't think about why types of tutorials.
@Wodsobe
@Wodsobe 4 года назад
This is exactly what i needed! Thank you!
@martin_senges
@martin_senges 4 года назад
You are welcome :)
@bitmammothOG
@bitmammothOG 4 года назад
Any chance you could upload this to github? it would be nice to be able to follow along and not have to reconstruct the project :) Either way thank you very much for sharing this knowledge!
@martin_senges
@martin_senges 4 года назад
Probably not. For this type of video I think people want to integrate specific features like camera behavior in their already existing project. So I try to make the tutorials work in a way that allows people to "get the idea" instead of having to use the actual source code. However I also plan on uploading more base projects on martin-senges.itch.io/ Those projects will be designed to be used as as a base to develop a game around. Similar to the stuff someone can find in the Unity Asset store etc.
@1u8taheb6
@1u8taheb6 3 года назад
​@@martin_senges With respect, if you publicly share code for educational purposes without providing an accessible copy, you create an unnecessary barrier for anyone who enjoyed your lesson and wishes to develop their intuition further. Sure, once people are confident they'll integrate the idea into their own project and make it their own, but nobody truly learns anything without first experimenting. Being forced to recreate this scene (or similar) from scratch just to play around and get a feel for things is a pain. That's my two cents anyway. Thanks for the helpful video.
@martin_senges
@martin_senges 3 года назад
@@1u8taheb6 I've explained my reasons in detail here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-DlWUn_2D73o.html
@NocturnalMorning
@NocturnalMorning 3 года назад
@@martin_senges This is a really dumb reason to not post your code. People will just go watch someone else's tutorials if you're not willing to do it.
@martin_senges
@martin_senges 3 года назад
@@NocturnalMorning And? I don't mind if people watch other tutorials.
@0ia
@0ia 2 года назад
I had an issue where as it rotated the thirdperson camera would get closer. A fix is to, before any transformations, save the camera's distance to the lookat point. Then, after all transformations, normalize the camera's transform and multiply it by the original distance. This was with my camera parented inside a kinematic body. Line before transformations: var dist = camera.translation.length() Line after: camera.translation = camera.translation.normalized() * dist;
@pierrenagonio
@pierrenagonio 4 года назад
Can you please make a video how to control camera movement using, instead of mouse, controller. Thank you for sharing your knowledge about godot engine.
@martin_senges
@martin_senges 4 года назад
Yeah I can do that thanks for the suggestion :)
@pierrenagonio
@pierrenagonio 4 года назад
@@martin_senges thx for feedback. still working on this, hard for me, THING. BTW I was using magicvoxel to create my own game. Lookd great imo..
@pierrenagonio
@pierrenagonio 4 года назад
@@martin_sengesohhhh forgot to wish U a happy New 2020 Year!!!!!!!!
@martin_senges
@martin_senges 4 года назад
Happy New Year to you as well :) And wish you much fun developing your game.
@classicguy7813
@classicguy7813 4 года назад
Great. For rigid bodies?
@martin_senges
@martin_senges 4 года назад
The script should work for any Player object inheriting from Spatial, as only Spatial node attributes/methods are used (rotation, translation, look_at). But as I mentioned at the end of the video: This is a basic script to understand how camera rotation works. Depending on your exact game, you'll probably have to tweak and add stuff.
@classicguy7813
@classicguy7813 4 года назад
@@martin_senges Thanks sir! you are a riot
@mattfield3371
@mattfield3371 2 года назад
Sir, just seeing you video now...thank you very much for this and all you do...I've subscribed to your channel and liked this video and will check out your others which I'm sure will also help me very much in getting started with working in Godot 3d game dev. The issue I'm having at the moment, which I'm not sure if you covered or not is that it seems that the $Player.FirstPersonCamera and $ThirdPersonCamera.make_current() and .clear_current() calls don't appear to be native to the camera objects and I'm not sure if you had covered how to actually code this functionality in another tutorial or not, if you have could you point me in the right direction, and if not could you please quickly explain how this functionality works if you wouldn't mind? I understand the concept and basic call but not sure if there's a native attribute to decide which camera is active or not which I'm guessing there must be? Thanks again for this!
@mattfield3371
@mattfield3371 2 года назад
Ok, think I figured out what's happening after looking at the Godot documentation for the camera function. It appears the issue wasn't with make_current() or clear_current() calls but the actual check to see the current view, there doesn't appear to be a method to do this within the native Camera functions, I basically just added my own function to both Camera objects I have to check if current by returning the Current bool that belongs to that object....one would think the functionality would exist as an inherent method within the function without having to be user defined, but eh not a hard thing to add...
Далее
Tutorial: First Person Movement In Godot 4
18:25
Просмотров 155 тыс.
How Godot's Transform3D Type Works
24:16
Просмотров 2,3 тыс.
We finally APPROVED @ZachChoi
00:31
Просмотров 4,2 млн
Godot 3.1: 3D Camera Gimbal
15:55
Просмотров 28 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 367 тыс.
Godot FPS Movement Tutorial - Wall Running
13:21
Просмотров 28 тыс.
I Made the Same Game in 8 Engines
12:34
Просмотров 4,1 млн