Behaviour Dependency

0 favourites
  • 3 posts
From the Asset Store
Sweet Alert
$4.99 USD
a beautiful, responsive, customizable, accessible (wai-aria) replacement popup boxes zero dependencies
  • Hi all,

    I'm looking at creating my first behaviour - dynamic squashing and stretching based on velocity.

    As this is dependent on the physics behaviour, what is a the best way to access physics properties like VelocityX etc. ?

    Thanks!

  • There is no easy way to access it, and it changes depending on the behavior. Also, bear in mind changing the size of a Physics object will cause it to destroy the physics body and teleport in a new one of the new size (since it's the only way it's possible in a physics engine), and that can cause glitches.

    The best thing to do is have a parameter in an action where the user passes a speed. Then it will work with all behaviors and any custom coded movements too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply, that's very useful. In regards to changing the size of the physics object - I only want to change the sprite width/height, not the physics body itself. Is it possible to change sprite size without updating boundaries (circle collision)?

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