What node/component to set as target to change gravity direction instead Character Movement?

If you use C++ you can remove the capsule from the character.

If you write pawn gravity, you can add your collision shape to a pawn.

There’s various different ways you can do gravity, but the only one I’ve used in using a line trace as the player moves around, to make sure it always sticks to what its moving on.

1 Like

Isn’t there a reason why a character has fixed collision? Shouldn’t I also have to attach a new root collision (or mabe sometihng else) inthat capsule collisions place? I think I can but I don’t know how to :frowning:

You have to edit it in C.

1 Like

If your are talking about the first topics I opened, I moved from line trace system as a main movement system. Probably I will use it only for enemy behaviour etc.

Like how? I mean what codes exacly? Since this is not minecraft I can’t write kill/capsule, summon/box collision I guess.

I have used line trace to keep track of what the pawn is supposed to be walking on. You can move on any shape, as long as it has slightly rounded corners, even upside down.

As I understand, the root collision os not rotating with the character. Sideways are ok, but not all inclines. It will slide if the surface contacts with the beveled are (except the very tip of it)

I opened this topic especially for this: Why is my character is sliding (when it's not supposed to) and the gravity not working right?

When you have Visual Studio installed, and you double click on the character, it opens the character, and you can just remove the capsule ( or change it ). But you have to fix the code that is expecting it to be there etc.

I don’t recommend it.

1 Like

Ok, and about the other way, coding gravity for pawn, how does that works?

Also what you mean by “you have to fix the code that is expecting it to be there etc.” Can’t I simly replace refferences somehow?

Like I say, a downward line trace that holds the pawn on the ground. As long as all the stuff you move over has curved corners, the pawn will be able to walk on any surface.

On the other thing: Once you open up the character, if you try and just delete the capsule, it won’t compile any more. Maybe you can just swap the capsule for a cube, but you might still have to twiddle with the code. I’d ask that as a new question, I don’t know much about it, I’ve never tried it.

The root collision does not rotates with the character as I see. When incline and gravity is changed to a direction outside a very limited area it slides. Did you watched the video? And when I disable it I can’t use an another collision instead as well, it just passses tru. Just take a quick look at that topic if you wanna help me and want more context.

On the other thing, I will try some stuff first, than as you said I will open a new question.

Yes, character won’t work. Pawn will.

Actually correction. I think you can set the gravity direction in the character? Take a look in the details ( I’m not at a machine ).

You mean I can set the gravity direction realtime by using a line trace in the character? And there is no problem setting the gravity in character, it is the pawn having troubles with gravity.

Take a look…? ( in the details panel of the character movement )

1 Like

Sure but that just optimizes my work, does not fixes the current problem. If I use a character, I will still have to deal with collision. Gravity in the character (not pawn) is already working someway.

What is the collision problem?

Man I can’t change it into a box collision (or complex collision, better) and I can’t use an another collision instead by setting it ignore. You must be tired today huh?

The character slides, because it’s moving, but not rotating as it supposed to be.

1 Like

Why a box?

Using complex for a character would not be a good idea, performance wise. It also won’t work with physics ( if you wanted that ).

Because my character is not a humanoid, more like a slime or a snail type you can think of it, and the game is vividly mostly 2d (as I have imagined it), and will use destructible physics etc. having a cylinder collision for character firstly makes it slide, secondly it would complicate stuff along the developmen process, having roundend collisions in a 2 directional game is risky I guess, think of like a bullet hits the beveled area, just an example, it might leave the settled action direction of the game. However the current problem with it is moving.

1 Like