Forum rules - please read before posting.

Feature Request: Character moving (changing speed) on slopes by using simple Unity Curves in the UI

Hi there!

I can't help but seeing a lot of people requesting slope support, or having issues with slopes.
And, now I'm one of them :smile:

While I understand that ease of use is the key, what about adding 2 fields (or maybe even just 1) to the class Player, without requiring extra customization on the user side?

It would add:

1 or 2 Unity "Curves" to fine tune how much the player forward speed is affected by the slope he's on. (let's say, a graph by default from -45 to 45 degrees on the X axis, and initially flat on 1: the default multiplier speed)

Using 1 field (packing climb up and down in a single curve):
A diagonal line in that graph would increase or decrease the player's speed depending on whether he's climbing up or climbing down. (in this case, climbing down accelerates)

A corner in the middle (at half the width), and two decreasing lines reaching 0.5 on both left and right sides, means the player will slow down by half when climbing up or down (stairs, VERY common scenario)

Using 2 field (one for climb up, one for walk down):
Both curves begin with a single point at the height of 1; adding a point on the right side of the graphs and moving it up or down, it either increases or decreases the speed multiplier accordingly.

A new field can be added to the animator field list named FloorForwardAngle or similar, passing relevant info to the animator, optionally, to have things like tweaking the player animation in some way based on the feet angle, measured in comparison to the character forward direction

(optionally you could also pass the FloorSidewaysAngle, to also be able to handle the player balancing on a slope when the player's left side is at a different height in comparison to the the right one)

I know you've answered countless time to this, by suggesting to extend or delegate, but I'm forwarding my feature request nonetheless, since I believe it's a solution that could just sit there for beginners, or be used by everyone else.

I believe slopes are a much requested and needed feature, and what I'm proposing should be clean and neat enough to not break anything (the default curve is a flat 1x multiplier)

Comments

  • Could you share some mock-up screenshots to illustrate the curve values?

    Nice idea, and something I'll think about - but not necessarily something that needs incorporating into the Char script itself. Since the walk speed can be modified through script, it'd be perfectly feasible to add such a feature via a separate component that you just attach in addition.

  • I've added a script to the wiki:
    https://adventure-creator.fandom.com/wiki/Changing_character_speed_with_slope_angle

    If it tests well, I'll consider official incorporation.

  • Hi there!

    Apologies for the delay, I was expecting a notification email but for some reason I didn't get one, I came back checking just to be sure.

    Yes, I meant the animation curves, the same used by the particle systems and Unity in general.

    I'm curious to test the script, but I have a good feel that it's what most people asking for when walking among ramps and slopes :) (I did a search and there were plenty of threads with people stuck on that).

    This approach should give players a more visual approach, and a lot of fine tuning possibilities.

    I'm going to test the script for a while :)

    Thanks for considering the idea, I'm glad you took the time to implement it :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.