Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How I make this movement system function?!

Discussion in 'Getting Started' started by xXNOPEPONXx, Jun 23, 2022.

  1. xXNOPEPONXx

    xXNOPEPONXx

    Joined:
    May 23, 2022
    Posts:
    1
    I'll preface this by saying I'm using visual script because I can actually understand it, but can make sense of things like C#.

    I'm trying to make a 3D Soulslike, with the twist being that the character you play as is always wearing roller blades.

    Since this is the crux of the gameplay, it's the first thing I need to prototype, and I just can't make it work.

    What I want to have happen is that accelerating and turning are different things. By pressing the action button, you increase your speed slowly over time, but the stick changes your direction without increasing your velocity. That way, you can coast around enemies without constantly accelerating, or allow the terrain to change your speed for you. You'll also have a brake button which slows you down to a halt if you keep it pressed, but just slows you down a bit if you tap it.

    Now, I've got the accelerate button, I've got the brake button, and the left stick changes what direction you face, though it does have some kinks to work out. The only thing I have left to do is to make turning actually function how I want it to. I haven't been able to.

    See, since I'm a newbie and thought it would make things easier, before I implemented the left stick, I set the pill object I was using as the player to have low friction. That way, when I stopped accelerating, I continued to move in that direction for a while. However, once I implemented a changing your angle, I realized that my low friction still carried me in the old direction. I could start accelerating in the new direction, but this made coasting the way I'd imagined it impossible.

    I have no idea how to solve this problem. I'm not currently using wheel colliders, and I'm not sure if I could use addForce the way I have been to just nudge you in the new direction.

    This is infuriating as Google Search won't answer my questions, instead picking out a keyword or two and very badly guessing what results I want, Discord servers just keep linking me to semi-related tutorials that often beat around the bush and refuse to actually help beyond that, and I don't know the engine well enough to solve the problem myself. If you can help, please do. Just tell me what I need to learn, and why I need to learn it.

    Thanks in advance for any advice. Have a great day.

    P.s. why are there only 4 available tags and none of them are related to my problem????
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Your movement system sounds really similar to a vehicle controller. I'd search for guides or assets that do that and just add your character's animation layer on top of it.

    Don't worry about tags. You don't need them here.