Physic Behavior won't sleep while Animation is running?

0 favourites
  • 2 posts
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • Hello,

    I have a player sprite with a physics behavior. The sprite is falling down on a platform with physics behavior. The sprite has also a animation with 1 frame (speed = 0, loop = false). If the player has landed on the platform, he's going to sleep and already is fine. But if I change the animation, add multiple frames and set the speed value to 24 (or whatever)... the player won't go to the "sleeping mode" after he's falling down on the platform. What's the problem?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably keeps setting sleep animaton every tick. Make sure it runs only once, once player falls down, otherwise it will be stuck at frame 1 because it keeps repeating ( play sleep animation ).

    Also when using physics, probably better to use a dummy object with physics behavior, then pin actual animation sprite to that ( no physics on this one ) , so frame changes don't interfere with physics. Hide dummy object on a bottom layer under backgrounds once it all works the way it's supposed to.

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