Smooth player jumping

ساخت وبلاگ

Vote count: 0

I'm making a game with Unity where player pick up a cookie and then player is jumping on y-axis. When player is jumping, he is twitching(very much). I want that jump and I want see that player is jumping smoothly. This is my sample of code

void OnTriggerEnter2D(Collider2D other)
{ if(other.gameObject.CompareTag("Player")) { player.velocity = new Vector2 (0, 0); player.AddForce(new Vector2(0,jumpHeight));
}

I tested about 1000f value of jumpHeight. Same problem is with higer or lower value.

Thanks and kind regards

asked 2 mins ago

- - , .

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 306 تاريخ : پنجشنبه 29 بهمن 1394 ساعت: 20:39