I’m currently making a sledding game and I am stuck on what I should do for the movement. Right now I’m using a pawn with a static mesh that I simulate physics on. To move I add gravity and forces left and right to turn. This is really janky and I was wondering if there was a better way. People have said to use the Character BP but I don’t understand how to make it slide down the hill. I am not going for something super realistic, its for a mobile game.
Use a character as a base with no physics and let the movement component emulate it. This will give you access to more settings that you’ll need:
You can use a snazzy skeletal mesh but it’s optional, it’s just visual; the collision is handled by the capsule at the root. When it comes to sliding, you’re interested in the setting highlighted above. By default, you’d slide from anything steeper than a 44.76 degree slope. Lower it to suit your needs, it can be adjusted dynamically during gameplay, too.
As a bonus, you’ll get easy access to additional data, the component keeps tracing so it knows what there is to know about the floor underneath - can be handy when detecting surface normals / materials and adjusting velocities or add special conditions. And if you want to fiddle with how the character responds and affects physics, you can - the Physics Interaction section covers that.
You’d normally control such character by adding movement inputs as directional vectors.
And if you want something simpler, consider Pawn + Floating Pawn Movement component.
If you decide to go the physics way, look into Physical Materials - this will allow you to control surfaces’ friction, restitution and some other settings not available anywhere else.
A pawn with floating movement comp, simulating mesh and physical material:
May require SOME tweaking. You should still control it with movement vector input. But external impulses and forces will affect it.
Wow! I really appreciate this. I have looked everywhere and there is nothing that has seemed to work for what I’m doing, but who knew it was so simple. Thank you so much! Is there some platform I can support you on?
You can upvote the answer, helps other find what they need. Good luck!
I ran into a slight issue. When I try adding movement input vector the character barely moves left and right. I tried cranking up the value I multiplied the right vector with, but it still barely moved.
I’m sorry but failed to reproduce this operation and in fact my character remained to stand on a slope even if the angle was set to zero. Maybe it’s because I only lowered Walkable Floor Angle? I would really appreciate any detailed information. Thanks!
It seems that you’re trying to tackle something quite different. Character movement varies dramatically from a sliding box that simulates physics.
Consider opening a new thread and provide as much info as you can:
- the purpose and the overall idea of how things are supposed to work
- what is not working
- what you’ve tried
- ideal behaviour
Meanwhile, have a look at this post / thread:
Perhaps it will help you get closer to what’s needed.
Oh, thanks for your reply!
I’ve created another topic:
Have trouble limiting input when sliding - Development / Programming & Scripting - Epic Developer Community Forums (unrealengine.com)
I would really appreciate your extra help.