Physics and Object Scale problem

0 favourites
  • 2 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • When I create a physics object (in code at runtime) and then immediately apply force everything works as expected.

    But when I create and object, set is scale and then apply force in the following line of code; no force gets applied.

    Any idea what is happening here? Is this a bug?

    Additionally I noticed that the force on an object is affected by its scale. ie the same force does much less if the object is scaled up. Is this a new thing? I thought that was only controlled by its mass.

    Also, the force seems to change completely again if my object has animation frames or not. In my case if I set my anim speed to 5 instead of 0; the same force applied has much less effect on the object. Why is this? Is this expected behaviour?

    Using r311 Beta

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Changing the sprite size or changing the animation frame makes the physics object's shape get destroyed then recreated and that gets delayed till the end of the frame which makes it lose forces/velocity. It's either intentional or an oversight of not transferring the forces to the new object. It's been like that since the physics behavior was made so maybe a bug report could get that corrected.

    The mass property in construct's editor should be labeled as density. The area of the shape changes what the mass is.

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