Character hover

Hi,

I have a problem. I want the character to move while hovering. Hovering works but the character doesn’t move.

Thanks in advance for your help!

1 Like

The character BP assumes that the player is on the ground to move.

Unless you change the movement mode to flying, for example

image

image

not fly, just hover at a constant distance (Line Trace distance)

You didn’t try it yet, right?

The character does hover. But, it uses the walking animation to move forward.

but tried it, but line trace doesn’t work when i do that

Can you show the trace code?

Meh, physics. Not my area, sorry… :-/

Thanks anyway!

1 Like

Not sure how physics interacts with the character component… :slight_smile:

I don’t know either, if it doesn’t work at all, I’ll have to look for another way

Unpredictably, verging on whimsically.

I’ll have to look for another way

Disable sim on the capsule and play with:

image

2 Likes

It works out. but now i have another problem. Jumping doesn’t work and it bounces on its own like a bouncy ball. Another problem, it slides like a car on ice when I move

it bounces on its own like a bouncy ball

You’re attempting something a tad unorthodox, something the component is not used to, so we need to work harder. We’re using physics via the movement component and it follows its own set of rules; has no simple dampening float, for example. We’d need to build some dampening, try this:

Jumping doesn’t work

Because we’re not touching the ground. Since we’re using physics, jumping equals adding an impulse - included in the pic.

You will need to fiddle with some settings to get the feel right, I’m also sure there’s a place for an aggressive curve - some things are not worth mathing-out. Also, explore this:

Air movement controls sit there.


There’s also this:

But requires a different setup and is not documented afaik.

And finally, you may want to create a full PID for this if the above is not enough - I found the built-in springs lacking fidelity in many areas, not enough control. You keep adding so much error correction only to realise you’ve built a full PID to handle the spring itself…

1 Like

You’re amazing! That’s better than perfect! :slightly_smiling_face:

One note, if you make the sphere trace radius larger than the capsule, you’ll be able to climb vertical walls. It may be worth using dot product on the hit normal, and / or figuring out the average floor angle in the area underneath.

Perhaps 4 traces are better here. The sphere gives a quick, agreeable result - that’s why I used it. Hope you can get it to work.

Is it possible to upload your example here? :slightly_smiling_face:

2 Likes