How do I Fix This Size Issue?

0 favourites
  • 2 posts
From the Asset Store
A versatile and wide-ranging selection of large to medium-sized creature sounds.
  • https://youtu.be/nfuCJCnKtU0 Video showing the issue

    Whenever I pick up a gun in my game, the player drops the old gun. The issue is that the newly dropped gun uses the dimensions of the gun that was just picked up, so shorter guns look stretched, and longer guns look compressed.

    From bug testing, it seems like it is using the dimensions from the first frame of the animation

    What happens when the player picks up a gun? A variable saves the player's current weapon, and the player's weapon is changed to the gun on the ground, and the gun on the ground is immediately destroyed. Afterwards, a new gun is created and switches its frame to the player's previous weapon.

    SS of Code

    SS of Frames and Animation

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could use a different object per gun. This will help fix the size, with image memory use and also in case you need to animate each gun later on. You can store the object name in variable for last gun and create it by name later on. Of course another option is to adjust the size of the object with actions based on whichever gun it is.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)