خرید بک لینک

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

- - , .

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

صفحه بندی