In this third episode, we will be able to make a simple jump and a double jump as well.
● Project files on GitHub:
● Playlist:
♥ Subscribe:
——————————————————————–
MY BEST GAMES:
● Rotator 3D:
● Helix Jump 3D:
● Runner Wheel 3D:
——————————————————————–
FOLLOW ME:
● Facebook:
● Twitter:
● Sketchfab:
● Website:
——————————————————————–
► All content by GDTitans is 100% free. I believe that education should be freely available to everyone.
Link do Vídeo
Sir, can you explain me? What is the meaning of developer 3.5pro?
Great videos! You need more recognition!
when i jump into a ceiling my character stays there for as long as the jump lasts and the gravity is instant when i fall off a platform
edit:fixed these on my own, heres the code (no double jump)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class movement : MonoBehaviour
{
public CharacterController controller;
private Vector3 direction;
public float hspeed=8;
public float jumpforce=10;
public float Gravity = -20;
public Transform GroundCheck;
public LayerMask GroundLayer;
public Transform CeilingCheck;
void Update()
{
float hInput= Input.GetAxis("Horizontal");
direction.z = hInput * hspeed;
bool isCeiling = Physics.CheckSphere(CeilingCheck.position,0.15f,GroundLayer);
bool isGrounded = Physics.CheckSphere(GroundCheck.position,0.2f,GroundLayer);
direction.y += Gravity * Time.deltaTime;
if (isGrounded)
{
if (Input.GetButtonDown("Jump"))
{
direction.y = jumpforce;
}
}
if (isCeiling)
{
direction.y=Gravity/2;
}
controller.Move(direction * Time.deltaTime);
}
}
How to make areas with sideways gravity or circular gravity?
Help,
i do as the script said, but found that my character stuck and can`t do a jump
do all the changes but still hasn`t got any progress 🙁
You sir, are a genius, thank you so much for this tutorial, it helped me very much!
Have a great day!
idk if using rigidbody for gravity is better or not here.
when i move Gravity * Time.deltaTime to else condition, my player can only jump once after that jump key become disable.. what happen?
thank you so much you got a new subscriber
thank you so much for these videos
Nice
Very nice and simple tutorial sir. I would suggest that you explain a bit about some of the components we are using in unity.
Is direction.y = -1; really necessary? When I put that in my code as you've showed, I have to press the jump button twice or more to jump.
hello I want to ask why when I make a public transfrom in my unity there is an error like this error CS0246: The type or namespace name 'Transfrom' could not be found
I don't know how to handle it
5.37 I didn't see the Ground Check & Ground Layer parameter in my inspector? Please assist. Thanks!
I really like these videos, you make great tutorials
Thanks for this video !
How could i adapt your code to make the character move forward while jumping ?
I am a complete beginner in unity
your endless runner series has helped me a lot
As I am a beginner i cant add the score and highscore functionality in the game
Please make a video on this topic please
Thank you so much for your videos