Forum rules - please read before posting.

Player running into the air/floating at a slope

Hey
I have this weird problem that when running, the player won't stay grounded. It starts with a slope down-hill, and when pressing forward the player just runs into the air and slowly floats towards the ground instead of running down-hill sticking to the ground.
This is the rigid body:
https://i.imgur.com/xM8Am4M.png
I've tried giving it a ridiculous amount of mass, increasing the drag just makes the character take longer to the float to the ground, and i can't really see a difference with angular drag.
Do you have any ideas for what I can do to fix this?
Thanks! :)

Comments

  • The "Y" lock on the Rigidbody is locked - try unchecking it.

    If your game deals with a lot of slopes / steps, it may be worth looking into switching over from a Rigidbody + Capsule Collider to a Character Controller, which AC supports built-in.
  • Hi Chris
    I've tried attaching that and unchecking the Y lock but the character is still running and floating down a slope. It can manage fine uphill, its just down a slope that it floats to the ground
  • edited May 2018
    Ah nevermind, no idea what I did but it seems to work now, thank you :)

    The only problem I have now is how can I get a character to fly/float in midair with the character component now being used? I assume it's stopping it from moving across a gap? I have a platform game, and a trigger at the end of a platform that when entered, the player is translated upwards, then uses the "go to point" which is on the next platform, which is supposed to make the character go up and fly to the next platform, but instead it's just rising up and immediately dropping again on that same spot.
    https://i.imgur.com/xslBO6C.png
    I've tried making the actions one after another instead of 'run in parallel', and also if i try to use 'move to point' with 'ignore gravity' on it's own then it still just runs off the platform and falls through the world instead of floating across the air to get to the next platform, so I think it might be a controller problem?
  • Having the player move to a point at the same time your translate him with a Moveable component is going to mess things up.

    If you want to temporarily disable the effects of gravity on the player, you can use the Player: Constrain Action before and after the translation.

    I don't know about the complexity of your game, but bear in mind that AC's built-in controller isn't designed with heavy platforming in mind.  If your game is a more arcade/action-orientated platformer, I'd recommend considering use of a dedicated motion controller to handle that.

    The "Custom motion controllers" chapter of the Manual covers the things to know, and a number of integration scripts with popular controller assets can be found in the AC wiki.
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.