Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to add gravity without rb in unity

public float gravity;
Vector3 velocity;
public CharacterController controller;
void Update()
{
	velocity.y += gravity * Time.deltaTime;
    controller.Move(velocity * Time.deltaTime);
}
 
PREVIOUS NEXT
Tagged: #add #gravity #rb #unity
ADD COMMENT
Topic
Name
5+3 =