Unreal Engine 5.3 Planet Gravity System #1 - Custom Gravity
HTML-код
- Опубликовано: 11 сен 2024
- Project Files: / 96505428 .
Today we are going to implement a custom character movement component that can be used with unreal engine character blueprints to simulate a planet gravity system. Usually, the default character movement components aligns with the z/up axis and still there is a way customize gravity direction inside the character movement component. This custom gravity feature is not exposed to blueprints. Today, we are going to setup a function to expose that gravity customization part with minimum C++ involvement so that we can simulate a planetary gravity system for characters in unreal engine without deviating much from the existing movement logic. So replication and everything that is built into the system by default will have a minimum impact in this system.
Full Playlist of Unreal Engine Planet Gravity System:
• Unreal Engine Planet G...
Full Playlist of unreal engine 5 stellar objects:
• Unreal Engine Stellar ...
► 👇 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐓𝐡𝐞 𝐂𝐡𝐚𝐧𝐧𝐞𝐥 // 𝐁𝐞𝐜𝐨𝐦𝐞 𝐀 𝐏𝐚𝐭𝐫𝐨𝐧!
/ codelikeme
►Patrons will have access to project files of all the stuff I do in the channel and other extra benefits
Join this channel to get access to perks:
/ @codelikeme
Like my facebook page for more content : / gamedevelopersclub
Follow me on twitter : / codelikeme2
Follow me on reddit : / codelikeme
#CodeLikeMe #unrealengine #ue4 #indiegamedev
Really cool tutorial! Hope you continue tomorrow with this series because this is one of your best series!🎉🎉🎉🎉
I will!
13:46 - why did you cut this node's setup? You cut and went to game, fixing it off the video. This is an amazing tutorial, but it will not work if the fixes are not shown in the video.
you glossed over the Component Class drop down for actually making the cast work. otherwise it just fails. Also your character orientates their rotation to the gravity automatically. Mine does not. trying to rotate the characters capsule results in nothing or it snapping for a single frame and going back to upright. Edit: I did get the capsule to rotate with the gravity.
The cast does not show up at all for me. Where do I find the Component Class drop down?
using UE5.4.1, I have copied the code exactly as as copied in the video yet the blueprint will not allow me to access the function I have created. Does anybody have a clue as to why this is?
My cast keeps failing
Have you tried to walk on the "side" of the planet (where the player is horizontal to the word). If so, can you tel me if exactly when the character is horizontal it starts playing the fall animation ? It may be easier to test on a small spherical planet than the one in the video
Also, try to crouch / un-crouch on very south of the planet and see how it goes. I don't know if it's only me having the issue or other people as well
I am experiencing a similar issue, as I approach the equator the movement in the Z axis slows
If you use a smaller planet (sphere with radius 5000 located at 0,0,0), as you approach the horizontal equator (where Z = 0) the character slows down and stops moving in the world z axis
I have fixed those issues down in the series. Keep following. This is only the 1st episode
@@CodeLikeMe Thank you
Would this system work with already existing replicated multiplayer code for a first person shooter
5:50 I don't even have a "component class"
Wow so Epic actually implemented a gravity direction in the character movement component and all we have to do is expose it to bp?? I am using the free DirGravity plugin but if it now has a built in solution, i will switch over to remove the plugin
It works fine so far for me. I implemented a transition of gravity from space to planet as well by the 4th episode of this series
@CodeLikeMe cool stuff. I already have a gravity well actor and gravity well component for my game that I whipped up in c++. The component will add up the gravity forces of all overlapping gravity well actors. I have multiple planets in the game. I'm not sure where I will actually have more than 1 well "active" at a time but the option is there. That's something you could add to yours if it doesn't already support it.
The problem is.... AI is not gonna be able to do the same, so... even when you can make a character to have gravity around a round mesh, enemies will not be able to be placed in that mesh and do the same.
Why not?
You may not be able to use AI navigation out of the box, but you can always implement a custom method for that
I don't know how to edit code in C++ ( where and what to open ). it's stupid to use multiple monitors to record a tutorial when we don't know how and what you opened to edit the script. Visual studio doesn't show me what's in the tutorial. so almost useless.
6:16 now lets go here ... Where is this? 7:40 how make this? for me visual studio does not give the possibility to create a new definition
For frame of reference, what planet radius sizes correlate to game worlds we would recognize? I want a game that would be about the same size as the planet in Everquest
Why doesn't it work even though I followed the instructions? :(
I figured it out I messed up one of the nodes
nice
This mechanic resembles Super Mario Galaxy's.
Very cool Tutorial, Thank You.
Glad you like it!
by the way i upgraded to 5.4 you can access to SetGravity function in blueprints as well idk if this is new in 5.4 but yeah.
no need to create cpp file anymore i guess.
nice
So, from what I can see, you have given up on floating pawn with gravity imposed by an add input vector directed towards the center of the planet, and you have implemented C++ allowing you to create a function that determines which direction gravity should go.
However, does this gravity influence the entire "cosmos" or just the character in question?
If I now add a second planet, while gravity points towards the first planet, don't I risk that all the objects on the second planet will be attracted towards the first?
At the moment in my project what I'm trying to do, however, by making the floating pawn, with the add input vector in the direction of gravity, is more similar to that of a little space man with magnetic boots that make him stick to the surfaces, what they are.
I have the problem of the steps, those of the stairs. if the riser of this step is at least double the radius of the character's capsule, (35*2) it is considered a wall and the pawn sticks to it, changing orientation.
But if I find myself in front of a step of only 20cm, the strength of the input vector (-1) is such as to prevent me from climbing it or significantly slow down the movement of the pawn.
I had used a line trace based system to detect forward and right vectors. Later on I figured out an improvement for that so it doesn't affected by the local changes of the terrain. I will share it sometime
this system can also be changed to get affected by the closest planet though
@@CodeLikeMe Ok, and what about if the planet wasn't spherical, or was it even a very irregularly shaped meteorite? Would the new system include these options?
@@CodeLikeMewhen will that be?
My project not compiles after adding Movement class :(
How to maintain gravity when turning on ragdoll?
Will you add a first person mode to this in the future?
will try
Hi, how are such planet terrains made? Did you use the WorldScape Plugin?
Here I used voxel plugin. But later i developed a method to generate a planet using geometry scripts.
check this video: ruclips.net/video/S7FbUNQsXts/видео.html
amazing tutorial
Glad you think so!
You have to make independent tutorials, not tutorials that force you to watch another video of yours!
Do you have any video about Niagara position base dynamic please?
i'm not sure what that means. can you explain more?