Тёмный

Unreal Engine 4 - Planetary Character Part 1: Staying Upright! 

Matt Taylor
Подписаться 2,2 тыс.
Просмотров 39 тыс.
50% 1

Use Blueprints to create a pawn that can be controlled while moving around a planet while maintaining correct camera orientation!
YAY!

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

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 91   
@Pistolsatsean
@Pistolsatsean 4 года назад
Idk if "radial force" was a component a year ago... but it seems to work great for gravity applied by an object, you should look into it Matt. A quick explanation of how to use it: create planet, add "radial force" component and make it apply a negative impulse, and apply that impulse over event tick, (may also need a negative force [I had hoped that it would work without supplying impulses, but that doesn't seem to be the case]) then all you need is a big enough radius, which is easy enough to make dynamically proportionate to the planet's radius! Great tutorial btw, they really help!
@trampflips101
@trampflips101 4 года назад
Yeah I honestly thought this is what would be used, glad it exists now!
@thegreendude2086
@thegreendude2086 2 года назад
thank you for sharing this, its really hard to find a tutorial that is somewhat recent and this definetly helps
@Pistolsatsean
@Pistolsatsean 2 года назад
@@thegreendude2086 Your welcome! Good luck with your projects!
@cyrusjameskhan
@cyrusjameskhan 5 лет назад
Great tutorial, works fine on a perfect sphere. though I'm trying to set this up with a more uneven planet terrain and having no luck.. :/
@themadduck8784
@themadduck8784 Год назад
Five years later this saved me, thank the heavens!
@jensfutterer9333
@jensfutterer9333 2 года назад
I think the problem why you can't control the rotation of a character blueprint class is because the character blueprint class has a Capsule Component as top level element and in viewport under the 'transform' tab the only option is to change the scale. When you create a pawn from scratch your top level element will be a Default Scene Root and if you put a Capsule Compnent within this scene root it then can be rotated as you wish. As soon as you delete the Default Scene Root from your Pawn you no longer can rotate that Capsule Component.
@LittleBlue42
@LittleBlue42 6 лет назад
You could make your own "landed" state by using a line trace or by adding a collision component to check it you are on a surface.
@somethingwentwrong196
@somethingwentwrong196 6 лет назад
Reminds me of Brackeys ludum dare entry. Nice tutorial! Thank you!
@thepixelcookies5433
@thepixelcookies5433 5 лет назад
same
@QuiteDan
@QuiteDan 2 года назад
Hi Matt! I've made my own character controller similar to this (first in unity, then in unreal, as I transitioned to unreal). It's been nagging me in the back of my head to use c++ (daunting, scary) instead of blueprints for it, because of how everyone is like DON'T DO TICK IN BLUEPRINT IF YOU CAN HELP IT. Have you found if this even matters on a larger scale? If 200 custom capsules are running around a planetoid, does it have a larger performance difference vs 200 characters running around on the ground with a regular CharacterMovement component?
@thegreendude2086
@thegreendude2086 2 года назад
I am not a 100% sure why everyone is avoiding event tick, but I believe it to be optimization, since it fires even though it might not be relevant in some situations A good alternatives are timelines, you can make them loop, which is essentially like event tick, but you have the option to turn it off when its not needed
@mrlnmnr
@mrlnmnr 2 года назад
still work on ue 5.0.3. i just change some values, like linear dumping
@oow_vini
@oow_vini 2 года назад
Hello Matt, all right? I have a problem, whenever I keep the walk button pressed, it just starts to go up and off the planet, I have no idea how to fix this...
@hxlxna_9962
@hxlxna_9962 10 месяцев назад
Hey! This works great, but I want to use a skeletal mesh. And if I use one, it doesn't work anymore. any tips for that?
@thegreendude2086
@thegreendude2086 2 года назад
when you set up the controls, moving forward and moving to the right are essentially the same except of the get vector node right? somehow I cant get it work, only forward works This is such a simple thing, I have no idea what could be wrong, its literally copy n paste
@u3dsbvrge272
@u3dsbvrge272 Год назад
100 likes. I found reaaly good and simply implemented gravity orientation. Thanks a lot for sharing yours experience
@taoMi-jw4kx
@taoMi-jw4kx 6 месяцев назад
How do I apply this series in UE5.2? I've encountered some unsolvable problems.
@icosart1520
@icosart1520 3 года назад
AWESOME TUTORIAL!!! can you explain how to limit the jumping to to 1 jump until you land ... I'm also having a bit of jitter after landing while moving ... hoping you could explain how to work around these issues.. thnax in advance!
@PolyStylized
@PolyStylized 5 лет назад
Thank You so much, I have looked for documentation for this for years!!
@OlahLingling
@OlahLingling 4 года назад
Hey nice tutorial thx for that! But after taking a few steps on my Planet im always starting to take off, can someone tell me whats wrong pls?
@DarksealStudios
@DarksealStudios 3 года назад
when i go past the equator the directions flip because of the negative(?). How do I get my camera to stay oriented z down as well? just repeat for camera?
@blakegt.7326
@blakegt.7326 6 лет назад
OMG.... Fantastic tutorial Matt! do you think this might work with a Character BP and its walk animation in the future, or it´s impossible with current Unreal update? well i´m going to try... this tutorial it´s just spectacular.
@matttaylor4803
@matttaylor4803 6 лет назад
I gave it a shot and ran into some trouble. I used a custom character BP with camera hooked up much the same way as in this tutorial. But he camera kept turning suddenly when transiting the globe vertically (in world space). I don't know why this would happen or how to fix it. Second getting the walking animation working is going to take a bit of doing (but should be possible). The character won't be in the "walking" state on the planet because the maximum walkable angle is in world space (and to change would require an engine level change). This means the character will be in either the falling or flying state. Getting the animation to work would probably require hooking up motion in the flying state to the animation. Haven't tried that myself.
@blakegt.7326
@blakegt.7326 6 лет назад
If the only problem you had was the camera, but walk animation did work right for back, right, left etc, then maybe you could have a second camera without spring arm, and this camera could switch every time you touch a planet... i haven´t try this, but i think the problem by using a pawn is the lack of a movement component, that´s why a character its way better option, try a camera without spring arm and maybe ther is another way to simulate the same effect that spring arm does.
@icosart1520
@icosart1520 2 года назад
awesome tutorial... I tried to replicate this on UE5 with no success.. any chance you're going to make an updated version?
@matttaylor4803
@matttaylor4803 2 года назад
Possibly. I've actually started messing around with a more generalizable version of the thing. We'll see how much time I have.
@skrever645
@skrever645 2 года назад
Просто лучший!!! Спасибо большое за урок, раскрыл глаза мои!!!!
@wolflyset
@wolflyset 5 лет назад
Hi, loved the tutorial, but I do not know why i have been reaching escape velocity. Tried using a clamp but it did not do anything. You have some idea on why is it happening?
@GameDevs4Fun
@GameDevs4Fun 6 лет назад
Everything works but my camera does weird things. Is there any way you can upload the project to github, please?
@phycogsmithomniscience309
@phycogsmithomniscience309 5 лет назад
dont know why it doesn't work for you, but for 3rd person it works in new game mode, maybe its cause im using unreal 4.20
@Latvian3Dman
@Latvian3Dman 6 лет назад
Gonna try this, thank you. I am interested if this is workable for flying vehicle that could level itself to made up "planet". Thank you for sharing this tutorial. When I try some tests, I will posts how it went for me ;-)
@boxjump4033
@boxjump4033 3 года назад
i can't move / i just can move my player camera is it because the update? / 2 years Help me plz
@TheModExperiment
@TheModExperiment 7 месяцев назад
This works great on ue4, but it would be cool to see it on ue5 :3
@digitaldruglord6888
@digitaldruglord6888 4 года назад
how can we make a pawn walk up and around a cube without falling?
@DKJens44
@DKJens44 4 года назад
I cant moving my mesh :(
@MZR_ytb
@MZR_ytb 4 года назад
Same
@rodrigoxavier3222
@rodrigoxavier3222 4 года назад
Same. I think each new set physics velocity you add overrides the last one. At least that's what happening with me. If I remove the gravity part I can move forward and backward but not sideways, if I remove forward movement I can move sideways then, but if I put forward back sideways stop again.
@logmatrix7911
@logmatrix7911 3 года назад
@@rodrigoxavier3222 Set the "Set Physics Linear Velocity" to "Add to Current" to Yes.
@PolyStylized
@PolyStylized 4 года назад
Hello, I was wondering if anyone has found a way to combine this with the VRExpansion plugin?
@2ndclss
@2ndclss 4 года назад
How did you open up world settings at 1:12??? I only have details.
@2ndclss
@2ndclss 4 года назад
lol foudn the old comment. i figured it out tho
@nukima11
@nukima11 5 лет назад
I want to make a planet sized map using height maps but I can't find a tutorial. I can add gravity at later I'm just trying to figure out how to make a full-scale planet. I only need one.
@coolnamesTV
@coolnamesTV 4 года назад
excellent video, thank you
@ParkusYT
@ParkusYT 2 года назад
Please do this in Unreal Engine 5, this doesnt work anymore
@lucasmarins7535
@lucasmarins7535 3 года назад
is there any way to limit the camera's rotation on the y axis ?
@matttaylor4803
@matttaylor4803 3 года назад
Maybe something like: Break the relative rotation and remake it and when doing so: Set the value for the axis in question to the min of what it was or the max value you want for the limit. Make sure you use relative rotation.
@Rossilaz58
@Rossilaz58 5 лет назад
My physics seems to be broken - whenever i walk i spin around in a circle at an increasing pace with no way to stop it.
@voicehead
@voicehead 5 лет назад
sounds like my life in a nutshell
@matttaylor4803
@matttaylor4803 5 лет назад
It's really hard to debug without seeing the issue and looking at the code but my guess would be that some rotation that should be applied around one axis is being applied around another.
@voicehead
@voicehead 5 лет назад
..sounds like my life in a nutshell
@Rossilaz58
@Rossilaz58 5 лет назад
@@matttaylor4803 I've fixed it. Just turned up Linear and angular Damping in my pawn's mesh. Must say - This tutorial is very helpful! I'm making a survival game where you are on a very small moon (very small, around house sized) and you have to get off of it
@bigsk8743
@bigsk8743 3 года назад
How would i go about clamping the speed and rotation of the pawn?
@matttaylor4803
@matttaylor4803 3 года назад
A particularly difficult task considering clamping speed/rotation is typically done from the world frame of reference rather than the frame of reference of the planet. Made even worse if the planet is rotating. I've never come up with a perfect solution, but a good start is to: 1) grab the surface location below the pawn on the surface of the closest planet 2) set a scene component object at the hit location and attach it to the planet 3) save the world location of the scene component as a vector 4) on the next frame grab that scene components new vector and compare to the last to get the instantaneous tangential velocity of the surface of the ground below you. 5) use that tangential velocity as a frame of reference to calculate velocity max etc in any given direction 6) move the scene component to directly below you again, rinse and repeat 1-6
@bigsk8743
@bigsk8743 2 года назад
@@matttaylor4803 Thank you so much :)
@Thermal694
@Thermal694 3 года назад
Amazing!
@Hasan-gh9gv
@Hasan-gh9gv 6 лет назад
How to show how to swipe lane on this planat like Endless runner ?
@ericlassard9
@ericlassard9 3 года назад
You can use ninja character asset
@UserNotFound00101
@UserNotFound00101 6 лет назад
Hey Matt, love your tutorials. Im trying to apply this to a game Im working on, but my character spins around like crazy! Any idea why?
@Yipper64
@Yipper64 5 лет назад
if it still matters to you, 18:40 may have been your issue.
@lordofthelair6716
@lordofthelair6716 2 года назад
Can we add a landscape to the planet?
@matttaylor4803
@matttaylor4803 2 года назад
Not easily. I'd recommend modeling a landscape for a sphere outside UE and bringing it in. Foliage is also difficult.
@lordofthelair6716
@lordofthelair6716 2 года назад
@@matttaylor4803 youtu.be/zDLks i just wanna know, how did he do it?
@arunbalajism1386
@arunbalajism1386 5 лет назад
I added this script to a pawn and it worked fine. But it is not working for the AI.. can you help me with how to add this same gravity to AI and make it chase the player.
@matttaylor4803
@matttaylor4803 5 лет назад
You probably will have to write your own nav mesh code and implement a version of an AI algorithm (A* etc.) using 3D space. I'm not sure if UE4's Nav stuff is going to work for the surface of a square. Conversely you could do something out of the box like map the points of the surface of a sphere to a flat plane and then have a marker for where your character is on the planet on the plane and have the AI navigate on the plane and then map their position back to the BP on the planet.... No matter what it will be a lot of trial and error work (unless UE has something I'm unfamiliar with).
@arunbalajism1386
@arunbalajism1386 5 лет назад
@@matttaylor4803 Thank you for the reply.... I'll try what you told.
@chacoolman3392
@chacoolman3392 5 лет назад
my Jumping doesn't work? );
@n1lknarf
@n1lknarf 5 лет назад
does this works for a regular landscape?
@matttaylor4803
@matttaylor4803 5 лет назад
It should work but I would not use the landscape itself as the gravitational object. But you can probably wrap a planet in a deformed landscape and have it work.
@usualspace3247
@usualspace3247 4 года назад
I got it working, however the rotation wont update when moving across the planet, what can I do?
@Zumito
@Zumito 4 года назад
agrega la rotación del planeta al actor
@PolyStylized
@PolyStylized 4 года назад
Heyyyyyyy UsualSpace! It's such a small world :)
@usualspace3247
@usualspace3247 4 года назад
@@PolyStylized hey you!
@somethingwentwrong196
@somethingwentwrong196 6 лет назад
landed on the planet but bounces me infinitely after jumping.
@voicehead
@voicehead 5 лет назад
built in jello physics
@LittleBlue42
@LittleBlue42 6 лет назад
I have a first person camera attached to my pawn, and when I am on the surface, it jitters quite badly. Is there a step I missed, or a way to stop the jitter?
@LittleBlue42
@LittleBlue42 6 лет назад
@ProVenatus I managed to mitigate it by doing some clever line tracing tricks to create my own "on the ground" mode.
@Bredmirror
@Bredmirror 4 года назад
@@LittleBlue42 With the line trace did you change the velocity or the rotation?
@unrealengineruseng9583
@unrealengineruseng9583 4 года назад
Thank you man !!! You can help me !!!
@amswan
@amswan 2 года назад
doesnt seem to work
@unrealengineruseng9583
@unrealengineruseng9583 4 года назад
THANK YOU MAN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@II-er7gj
@II-er7gj 4 года назад
Can you make a tutorial please where you can show how to create planet with UE4 Landscape tool? Static mesh are not useful - we need Planet made out with UE4 built in Landscape tools - that makes possible to use splines, auto materials, foliage painter and even sculpt easy manually and etc good stuff - but static mesh cannot do all these things! Please make tutorial for planet creation with UE4 Landscapes!!!
@amswan
@amswan 2 года назад
ive done it three times now, step by painful fucking step - no dice
@АлександрК-м1я
@АлександрК-м1я 5 лет назад
Dont work
Далее
I Made a Tower Defense Game in Unreal Engine 4
13:58
Просмотров 436 тыс.
Wildest 10 SECONDS OF HIS LIFE 🤯 @TomIsted
00:14
Просмотров 1,4 млн
Million jamoasi - Amerikaga sayohat
12:37
Просмотров 220 тыс.
AI Boxing Got me Wheezing
15:06
Просмотров 314 тыс.
Making The ULTIMATE Movement For My Game
5:07
Просмотров 30 тыс.
Unreal Engine 5.4 Motion Matching in 13 Minutes | 2024
13:41