5 dicas para melhores plataformas em Unity (com código)!



5 dicas para fazer seus jogadores de plataforma se sentirem e jogarem melhor no Unity! Junte-se ao GamesPlusJam 3 em https://itch.io/jam/gamesplusjam3 Obtenha meu último curso da Udemy ‘Aprenda a codificar criando um jogo de plataforma 2D em Unity e C#’ em https://www.udemy.com/course/unityplatformer/? referênciaCode=A26D4239066E714CF648 Não se esqueça de apertar o botão de curtir e, se quiser ver mais jogos bons, inscreva-se para mais! Junte-se à comunidade discord em http://bit.ly/gpjdiscord Siga @gamesplusjames no twitter em http://www.twitter.com/gamesplusjames Apoie o show doando em http://www.patreon.com/gamesplusjames Outro music “Tema para Harold var 1” por Kevin McLeod – http://www.incompetech.com

source

21 thoughts on “5 dicas para melhores plataformas em Unity (com código)!

  1. One more thing is to pay attention on small jumps as it might cause exploits later in case you have some boosters or things that push you up, player might use the space key to slow them down to have better precission on landing. So maybe just add a guard in that cases that user jumped from the ground or a booster

  2. Also instead of making dust on input value you might want it to be on velocity.x, as when you move towards a wall and hit it it will continue to generate. Sometimes this might be desirable to show the player pushing stuff while drifting on the ground but in that case you might want a directional particle system so it will not generate in one place but show the opposite direction of pushing

  3. for hangtime you might need to set hangtime to 0 on jump as people might exploit it to double jump
    * same for jumpbuffer as it might double jump if it's hitting a ground or something jumpable in that 0.1 sec

  4. To fix the double jump problem:

    // manage jump buffer

    if(Input.GetButtonDown("Jump"))

    {

    jumpBufferCount = jumpBufferLength;

    }

    else

    {

    jumpBufferCount -= Time.deltaTime;

    }

    if(jumpBufferCount >= 0 && hangCounter > 0f)

    {

    // theRB.velocity.x means that we leave the x axis as it is

    theRB.velocity = new Vector2(theRB.velocity.x, jumpForce);

    jumpBufferCount = 0f;

    }

    if(Input.GetButtonUp("Jump") && theRB.velocity.y > 0f)

    {

    theRB.velocity = new Vector2(theRB.velocity.x, theRB.velocity.y * .5f);

    hangCounter = 0f;

    }

  5. id understand tha logic behind your code in buffer jump. If i'm not use jump the value of JumpBufferCount will be – Time. deltaTime. But is wrong becouse if i don't jump the value will be -infinite

  6. When i set up the footsteps effect the same as you have yours, i still cant see the effects when i play the game. you can kinda see them but they are soooo small you cant really see them at all

  7. 15:25 . for some reason when moving right my camera goes too, but when i move left my camera doesnt go left but right.

    yet the camtarget child does go left and right accordingly, i can see that via plus and minus position.

    but my camera doesnt go left when child goes. anyone help please? i really dont know fix

  8. Maybe this is a silly question, but what's going on with groundCheckPoint2? Like, it makes sense for the first one to be placed at the player's feet to detect the ground, but where is the second one being placed?

Deixe uma resposta

O seu endereço de email não será publicado. Campos obrigatórios marcados com *