I have a player who can jump. I want the character to stay in its position and not fall to the floor.
This is the code I am using so far:
private void FixedUpdate()
{
if(moveup)
{
rigid.AddForce(new Vector3(0, 1f, 0) * speed, ForceMode2D.Impulse);
moveup = false;
}
}
How can I stop the character from falling?