Updated the project to 4.25 - Link in description - Moved code into Actor Component
@issamaf80
4 жыл бұрын
thx
@SykoticWayz-
4 жыл бұрын
Thank you so much for this amazing tutorial and the project!! Liked and subbed!! Great work!!
@anderskaiden3583
3 жыл бұрын
i guess I am kinda off topic but do anyone know a good place to stream new series online ?
@DurgasiMuralidhar
2 жыл бұрын
Hey Greg, i have doubt how to find slope Terrain Mesh FBX using vertices points please tell me the solution it is really helpful my project thax..
@radleypillay7096
2 ай бұрын
Hey man, thanks for this. Very well explained and still helpful 8 years later 😄
@anacondagames
2 жыл бұрын
Almost 7 year old Tutorial, helps till today, great !
@Aethelvlad
3 жыл бұрын
Found a bug...if the player moves ever so slightly left/right while on the slope without forward movement, the comparison returns an angle within normal threshold and resets movement speed, allowing the player to negate the slow down effect by walking in very small zig zags up the slope or just walking sideways for a second. My game includes traversing mountains which means movement on slopes will not always be directly upward/downwards yet I still want to retain the adjusted speed. It definitely is a much better idea to do this via a slope tracer. Either way this is a great starting point, thanks for the tutorial! Another issue I have is with my sprint function because that changes walk speed on a button press, which conflicts with this logic. I have yet to find a way to combine the two pieces of logic.
@indicidian7179
6 жыл бұрын
How would you make it so that the character retains the momentum from moving downhill, like the more downhill they go, the faster their default speed is? As if they were using their momentum to make them run faster, but still be effected by uphill climbs?Would you just set the rate between speeding up to slowing down to zero?
@decayedwolf1997
Жыл бұрын
Only one person asked this? Why? It’s the biggest problem I’ve had. I’m working on a Sonic Adventure-style game, so I kind of need this to work 😅
@mingyenwu9621
2 жыл бұрын
That mapping trick to simulate momentum is pretty neat! Thank you for the tutorial!
@JaredKellen
3 жыл бұрын
Super Helpful. I am using it in my VR game and it really adds more realism
@KuuttiProductions
3 жыл бұрын
Great tutorial! Im making skiing simulator and had problems with floor angle and stuff. But this helped lot!
@dragonknightsofantar1737
7 жыл бұрын
This looks like a less painful way to work on my flying character to loose speed over time depending on pitch. Been at it all day. Gonna give your way a go tomorrow. Nice and clean.
@Rezgi
4 жыл бұрын
Very clean methodology, thank you for the quality information !
@EAPvideoz
9 ай бұрын
It works great, but I would like to know if there's a way I could have my character keep their downhill momentum after they reach the top speed going downhill, keep gaining more of that momentum with each downhill incline, and then reset the character speed to the default when the player stops moving/hits a wall?
@jiekii
Ай бұрын
good idea
@GoblinGamesLtd
5 жыл бұрын
Thanks! This is really useful stuff. I was able to rework it to control the speed of NPC's for fake root motion using extracted curve values.
@cinebst
7 жыл бұрын
Invaluable tutorial. Like, really, really useful. Thanks so much, man. With that said, I have an issue. This works great if you use one movement consistent speed, but I want my character to change that depending on certain conditions. For instance, my character can crawl and sprint, and obviously I don't want my "crawling" speed to match my "sprinting" speed, or my normal running speed. I thought about using the incoming "slope" speed as a multiplier instead of a straight replacement, but I'm not having any luck so far. The character just slows to a standstill when you try to walk. This video is pretty old, but I hope you can help. EDIT: Whoops, should've checked the comments more thoroughly. You answered this somewhere else.
@TheAnimator1808
2 жыл бұрын
Were you able to find his answer in the comments?. I'm having the same problem myself and I can't find a solution.
@HelderP1337
7 жыл бұрын
You just saved me most likely days of headaches, thanks so much Greg! And of course, obligatory noob question. How would you trigger a slide animation when going down the slope? Instead of the character running downhill faster, it would simply slide.
@GregMladucky
5 жыл бұрын
So, you would check to see if the slope is past a certain pitch and then swap the character into a new state. When I did slides in other prototypes I normally keep the walking code Epic has created but lower the friction and keep adding movement input forward automatically. The player can add side input still. So they have some control.
@GregMladucky
5 жыл бұрын
I do have a power slide prototype I can clean up and post at some point. I'll link it when I can!
@issamaf80
4 жыл бұрын
@@GregMladucky can you do this much appreciated
@GregMladucky
4 жыл бұрын
@@issamaf80 Here is the power slide prototype I dug up and updated to 4.25 - Its not quite the slide downhill idea asked about above but could help in figuring out how to setup a version like that. drive.google.com/file/d/1q9-WmZv0D-TsqChJQxikXiJMJVG6HTHS/view?usp=sharing
@nerdpraxis
3 жыл бұрын
Good Video, nice explanations besides the actual stuff u do, like hove u go in a little deeper WHY u do it. Thanks bro
@danewheaton6917
8 жыл бұрын
Thanks! I'm just learning Unreal - this is the first Blueprint I ever wrote. :)
@andr101
5 жыл бұрын
hello thanks for the useful tut! One question: my setup is the opposite. The character increase a lot the speed when he walks uphill. My issue is that when he reaches the top at very high speed, the character sticks to the ground, like he doesn't conserve his momentum. I expected him to launch himself high into the sky... :D
@rashigupta6162
5 жыл бұрын
Try by decreasing the gravity scale
@__dINe__
6 жыл бұрын
Bravo! You need to make more tutorials like this, are very helpful!
@MalcomX175
8 жыл бұрын
Thank you for this, as it helped iron out a problem I've been having for the longest! One question though, how would you apply the character's angle to this? Meaning, the character's angle would follow the curve of the slope and adjust accordingly.
@GregMladucky
5 жыл бұрын
So I'm not sure if you are able to rotate the capsule component directly. You might... But I would suggest just rotating the character mesh based on the incline. I'm not at my computer at the moment, but I believe you could use amake rotator with axis node. Giving it the actors forward and right with the pitch. Ill have to look into it soon and let you know!
@jabomb1085
4 жыл бұрын
Did you work out how to do this?
@TheAnimator1808
2 жыл бұрын
Old video, but how would this work with crouching? Everything functions as it should, my player capsule and camera is still affected by slopes even when crouched, the only thing I can't figure out is making the max walk speed to half whilst crouched and have it be affected by slopes.
@imawafflelad8453
7 ай бұрын
Say your "forward" angle on your character changes with the angle of the slope, say, as their animations match the slope they're on. How would you calculate it, then?
@Wizardbobo11
3 жыл бұрын
THANK YOU VERY MUCH!
@DouieSnow
6 жыл бұрын
Hi great tutorial! you made it sound all to easy. But can this method be used using VR? I don't have any movement characters in my setup as most of it is biased of a collision capsule and I've been trying to find a work around to make this fit but cant seem to get anywhere, was wondering if you had any ideas?
@hubertkomar4552
3 жыл бұрын
I'm making a flight sim and wanted to make some dynamic flight mechanics as in if you fly upward you burn more fuel, downward you burn less, and even more angle specific values burn different amounts of fuel. So my question is how can I obtain a player's current angel during flight? My project is also using blueprints as well. Is it the same concept as in the video ?
@fkmeta3479
3 жыл бұрын
worked exactly, thx
@LudwigvanBeethoven2
5 жыл бұрын
I think character movment does a line trace anyways so you can use that hit information without extra cost
@GregMladucky
5 жыл бұрын
Yep it does! This video is quite old so you can instead switch it out and use the character move component ground trace instead. Its a hit variable called current floor I think!
@ThaGuyWithCake
5 жыл бұрын
How did it take so long for me to find this amazing tutorial? Thanks for the content :)
@romanfolwarczny850
8 жыл бұрын
Hey Greg, could I please have a quick word of advice? Basically, I've gotten this function working accoding to your tutorial, but what would I need to do, if I wanted to rotate the capsule component of my actor on Y axis based on that floor rotation angle? Thanks
@GregMladucky
8 жыл бұрын
Hey Roman, unforutnaly I don't believe that Unreal allows the character capsule to rotate. Its built in a way that keeps it straight up and down unless they changed it in more recent updates. You can most likely rotate the player mesh to conform to the ground angle by setting its rotation right after we calculate the angle. Just get the mesh and set its world rotation based on the pitch we are getting, making sure you add in the default 90 degree turn if you are using the mannequin. I haven't gotten a chance to see if this works, you may have some trouble using the world rotation if the mesh starts to roll in strange ways. If that's the case you may have to convert the rotation you make to the local space and then apply it. Hopefully that helps!
@travisbehrendsen6992
Жыл бұрын
I added a Sprint function by boolean Is running or not when pressed or not pressed, all i did was add another nor and NOT to check if its running. My question is how can i interlope the max walking speed on a curve to slowly start walking forward to max speed?
@dzp8457
Жыл бұрын
You don't need to, just reduce the max acceleration value in the character movement component
@skilatgamedev3353
3 жыл бұрын
Really nice tutorial but it will be cool to get a tutorial to adapt animation too !
@Sagaan42
7 жыл бұрын
Hey, i'm having lots of trouble setting this up, because i actually already have variable speed values, and i just would want them to update whenever you're going downhill. Any idea on how i would do that?
@marleybishop9649
5 жыл бұрын
how about if you want the max speed to increase gradually when going downhill? Like picking up momentum
@Davidlcorzine
8 жыл бұрын
Can you apply this same sort of blueprint to free falling? For example like the Batman kick from a high building?
@DoubleMelonDragon
5 жыл бұрын
really good video! great tutorial helped out alot
@basicaccount3414
5 жыл бұрын
I need some help with a slide because it just floating in the air it gets me frustrated because I can't just do my best because I really really really really need some help with a slide glitching issues
@revan1611
5 жыл бұрын
Awesome tutorial! i'm having an issue tho, my sprint function doesn't work anymore when I add slope function. Can you suggest please a fix?
@GregMladucky
5 жыл бұрын
It depends on how you'd like your sprint function to work and how both of the functions will work together. The easiest way to do it for me was just to create another speed curve for the the character's current slope. One for jogging and one for sprinting. When you hold Shift, you enter a sprinting state, and the update slope function will switch to using the new curve. You can check out the current version of the project here: drive.google.com/file/d/14RjtMdyaX_aqTkYldcVXqXHtGMylgCJr/view?usp=sharing I have a few more things I will be updating on it, currently labeled in the blueprint as Work in progress. These are for the IK systems and character rotations as others have asked about it. Right now they are not connected to anything and do not run. But the sprint function has been added. You will need to further modify the sprint function to do what gameplay you'd like, for now it just sets a boolean we use to swap between the two curves.
@jiekii
Ай бұрын
The speed of the float curve in UE5.4 has not changed, and the speed is always displayed as 600
@magnusrexus
6 жыл бұрын
Thanks for the video this helps a lot
@adamkareem
6 жыл бұрын
Great tutorial! Really helped me out :)
@danewheaton6917
8 жыл бұрын
I'm trying to implement this with my sprint function - the way I have it, a bool is simply set every time the sprint button is pressed/released (hold to sprint). Before setting Max Walk Speed in your "Interp to Desired Speed" function, I set two values: WalkSpeed and SprintSpeed. SprintSpeed is WalkSpeed * 2. I then branch on my isSprinting bool, setting the Character Movement's Max Walk Speed to either WalkSpeed or SprintSpeed. It looks like this: puu.sh/q7DlV/b206ed60eb.png. I can't find my logic error - the player continually speeds up as the sprint button is held. Is this an obvious fix? Neither WalkSpeed nor SprintSpeed are set anywhere else.
@GregMladucky
8 жыл бұрын
Hey Dane, from the image it seems like you should have the desired effect. I did a quick test with a similar method but moved the speed multiplier before the interp node and it seems to work: imgur.com/a/B9bDy What exactly do you mean by continually speed up as the sprint is held? What is the desired effect you are looking for?
@danewheaton6917
8 жыл бұрын
Nailed it. Super smooth. Thanks a lot!
@thresholdseven8942
8 жыл бұрын
This was exactly what I was looking for, works great and integrated well with the Run/Stamina system I already had created, just had to get the nodes in the right place :D which was easy with your reply to Dane. Thanks!
@guitarbreakfull
7 жыл бұрын
So my Character start sprinting but now i cant stop sprinting. Someone knows how to solve this?
@thresholdseven8942
7 жыл бұрын
Cascha_A just need a walk speed node on the sprint-button release to set the speed back
@dawidzwiastunsikora8043
8 жыл бұрын
Hi, very cool idea. Is a chance for tutorial on how to do it with replication for multiplayer game? Thanks.
@GregMladucky
8 жыл бұрын
+Dawid “ZWIASTUN” Sikora I have done a bit with multiplayer replication and might do a follow up with that in mind! Not 100% when I'll be able to get it done though!
@Chegg_Chegg
3 жыл бұрын
So I had a running mechanic in my project before I added this, and now he can't run. Do you know how to fix this?
@BeatsOnSub
3 жыл бұрын
you must be conflicting the global settings of the character with the main mechanism of speed from this tutorial... Review your sprint system and global settings and make sure they changed at the root system not global, global settings normally mess's up everything when you change it if your mechanisms includes gravitys speeds and such .
@Chegg_Chegg
3 жыл бұрын
@@BeatsOnSub Im kinda new to ue4, only started in August, can you explain the root system and global settings a bit more and where to find them?
@BeatsOnSub
3 жыл бұрын
@@Chegg_Chegg “Root bone” its the main bone that any character you want must have to work in unreal engine, and by root system i mean, you gotta do the changes inside graphs (mostly if your changes are gravitys speed physics and etc) if you change in “world settings” it will conflict with the mechanism because mostly the mechanism is based on the world settings, so any specific changes gotta be done in the nodes inside the graphs, world settings should only be used for either testing situations or to have a few options and minimal changes
@Chegg_Chegg
3 жыл бұрын
@@BeatsOnSub to be honest I deleted it all, because it fucked my animations for crouching and dodgeing, and it's still messed up. Even after the fact that i deleted everything
@sticky_sweet
4 жыл бұрын
Hey Greg! I did everything identical to what you did - I checked 3 times! When I test the game, the character walks really slow for a second then stops completely until I restart it. What am I doing wrong? Does this make any sense? Any pointers would be greatly appreciated!!! Thank you for such a great tutorial!
@GregMladucky
4 жыл бұрын
Hey Hanna, the video itself is quite old and I'd recommend checking out the new project linked in the description! I do a few things differently in this version but it should work for Unreal 4.25 and uses an actor component for easier time moving it between projects
@sticky_sweet
4 жыл бұрын
@@GregMladucky Greg! You responded so fast! Thank you so much! You were right and just plugging in the little thingymajig from the project into my first person bp did the trick! :) One more thing, if I may - What I'm trying to do is create super hacky ladders by having a walkable 80-90 degree slope, which I needed to slow the character down on otherwise he just POWERCLIMBS it really fast :) I can't seem to make sense of the curve graph to make it accomodate these more extreme angles, though. What kind of values should it have?
@GregMladucky
4 жыл бұрын
@@sticky_sweet The curves are for easing the max speed and max "Acceleration" (Just the interp to values) They are from -1 to 1 and what you are looking to change is the SlopeSpeedUp - The max speed the character can move while climbing up hill and the SlopeInterpUp which is how fast that change happens. I'd lower the SlopeSpeedup and Raise the SlopeInterUp to something real high like 1000 or so to make the change happen quickly. Not sure if this setup will work for a ladder idea in general but it might! If you are looking to create a ladder movement I'd check out setting it up in the custom movement code. Hopefully the work around helps for the time being! Cheers!
@sticky_sweet
4 жыл бұрын
@@GregMladucky Greg!!! It worked a charm!!!! Thank you so much!!!!
@sticky_sweet
4 жыл бұрын
@@GregMladucky Oh, just one more question - how do I remove the momentum? So that there is no speed bleed when transitioning between different slope angles?
@The13thVGplayer
6 жыл бұрын
Does this work in 4.18 or is there something wrong with my Blueprint? I made this blueprint on the Sidescroller template BP
@guitarbreakfull
6 жыл бұрын
it works even with 4.20. And it should work in the sidescroller template too
@ChrisLegend27
4 жыл бұрын
I can't get this to work anymore in Unreal Engen 4 version 4.25 :(
@GregMladucky
4 жыл бұрын
Hey I updated the latest version to 4.25 tonight. It seems to still work, I moved over code to an actor component so its easier to move into a project / update for your own needs. Link for the 4.25 here: drive.google.com/file/d/1wH-gX6LIa_QQoQx9ErDXQN9q6M89uJ08/view?usp=sharing
@ChrisLegend27
4 жыл бұрын
@@GregMladucky yes, I found a solution. I honestly can't tell the problem. I follow the instructions over and over but I could not figure out what the problem was. All good now tho
@shaddowtheninja103
8 жыл бұрын
I followed this exactly in the newest version of unreal and it did absolutely nothing . Can you test it for me and see if it's the engine, or if I did something wrong.
@shaddowtheninja103
8 жыл бұрын
Never mind I am stupid. It works great.
@nonobhr1581
6 жыл бұрын
Hi I have the same problem Can you help me ? How are you resolv the problem
@crazyguy7585
8 жыл бұрын
Great tutorial I subscribe Ur Channel Can u do a foot placement Tutorial in Future with this bro
@GregMladucky
8 жыл бұрын
+Crazy Guy This is also something I've touched on, the IK placement, but haven't done too much with yet. It would be a good way for me to learn a bit more about the possible systems. If I get a chance to do a follow up video with Multiplayer I'll also look to add in the IK placement!
@IlGordos
8 жыл бұрын
is it possible that it does not work in version 4.11.1?
@GregMladucky
8 жыл бұрын
+Gorzarios I haven't had a chance to check it out yet for 4.11 but will do so to see. My guess is that it should still work but they might have changed one of the nodes. I'll let you know if I get a chance to see soon.
@smol.TomatenSuppe
8 жыл бұрын
how can i make him always slow. (for Horrorgame)
@GregMladucky
8 жыл бұрын
Hey Jamin, all you would have to do is lower the curve points we created to match whatever speed you'd like them to be going. Feel free to change the curve points around to whatever your game needs, by default the character's max walk speed is at 600 which is why I have it setup to hit 600 at the center when the ground levels out. You can move those center points down below 600 and even the move the top speed when moving downhill (Far Left Point) a bit lower as well.
Пікірлер: 97