Slide Down an hill

Hi,

I’m trying to make a ski game.

I’ve tried a lot of way to do this with blueprint but i’m quiet stuck.

How can i make my character slidding the slope, i mean with an automove forward when he is not on a flat part.

Thinking about getting the angle of the floor, and adjust the velocity/speed of my character ( with like coefficient or something ).

Is this a good way to keep going ?

Thanks a lot.

Not sure if this could work, but if you think outside the box you could simply imagine the Skier as having little wheels on his Skis.

To that end, why not try attempting to consider your Character as a vehicle, the vehicle physics engine would be very helpful in achieving some realistic movement in my opinion. (not that ive tried it, just a thought)

I was going to say that he should just use a sphere collision so that the player “rolls” downhill, but character’s come with a capsule collision. Kus03, you may be better off just using something like an actor for your character, unless you actually need to take advantage of character movement, and overridable functions. If you do ditch the character base class, you can just add a sphere collision, and add something to keep your player from visually rotating with the collision.

I would say he should use the Pawn class at least. Because this is the first class that the PlayerController can Possess. He can’t possess an Actor. So that would make things
more difficulty in some places. BUT i have no idea what things come along with the Pawn class.

But you could also try to play around with the Movement Settings on a Character. There might be some settings that you could change so the character starts sliding of
all kinds of slope angles (base is 45° or something?). It would be worth a try.

Now that I think of it after reading Exi’s post, isn’t there some friction stuff they can play around with in order to get the desired effect?

Probably, it could take a while to get the right values to achieve the effect he wants though.

Hi, first i’d like to say thank you for your answer !

Putting wheels under my skis was an idea i’ve considered ! I think this can really works.

That what a did for the moment. I based everything on my skis as actors ( score, hud, movement…).

Sorry for my english if what i’m trying to say it’s not clear.

Thanks a lot, i’ll give you quickupdates soon.

Cheers

Well, wheels COULD work, but that’s a really dirty workaround.

You might want to check google if you find general information about achieving this effect.
It doesn’t really matter what engine you use if it’s bare code. Only problem could be that you
might need to be able to convert written code in Blueprints. People could help you here understanding
this.

I just want to make sure that you don’t rush an idea that limits you later in what you want to do.

As a developper, blueprint is a concept hard to understand but this looks like so powerfull to use, and i’m sure it offers other possibility as coding in java, c.

My first algorithm with this game was to ‘play’ with the Z position of my actor. If Z new position is lower or upper than my actor old position means that is he is going down or up. Then i adjust the velocity. If he is going down i remove control, and making him going faster. But if i detect that the new position is superior, i decrease the speed. I have to play with lots of coefficients. I think this was maybe too a ‘school-way’ to implement this :stuck_out_tongue:

Your logic is flawed, you would be adjusting the velocity based on your previously adjusted velocity, and nothing would be invoked by the slope.