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
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
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
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
i liked the number 4 at 15:00 specialy the cam target script. I can use it for shake.
landing on 23:00 very cool.
love it
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;
}
When i tried to do coyote time it worked but it also added my game to double jump how can i fix it
I followed this bad boy to the letter and my character refuses to jump :/
would of been nice if you showed more of how the particle was set up. still cannot see my particles
Gold tutorial thanks you so much!
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
Thank you sooo much
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
Can we use cinemachine for the look ahead?
I love this style of videos. They have solid knowledge, and they tell you without trash talk.
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
how we can do double jump with this codes;
Really helpful! Thanks a lot bro
Oh man, I finished your Udemy course recently. Love the way you explain things. Great tips and pleasant voice.
No homo
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?
I have issue with camera ahead, Camera just moves on right side. I have different Camera script for following object, maybe that's the issue?