Unity Kinematic Gravity

PHOTO EMBED

Sun Dec 27 2020 12:56:47 GMT+0000 (UTC)

Saved by @cotterdev #c#

 void Update()
{
  _rb2D.velocity = _rb2D.velocity + (_gravity * Time.deltaTime);
}

//OR
//Gravity
velocity.y -= _gravity;

//Convert localSpace velocity to worldSpace
//velocity = transform.transform.TransformDirection(velocity);
velocity = transform.TransformDirection(velocity);

//Move
_controller.Move(velocity * Time.deltaTime);
content_copyCOPY