[r58] Physics Behavior failed after mirror/flip

0 favourites
  • 8 posts
From the Asset Store
Goodbye to sprite fonts, when you have something new on the anvil for your upcoming Games !
  • When you add Physics Behavior to a sprite, then set the sprite mirror/flip,

    (e.g.: drag it to opposite side, set height/width to minus number, set mirror/flip in sprite editor)

    it's physics behavior will fail.

  • And if you create hinge on those mirrored/flipped sprites, the game will crash.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why would you set its height and width to negative values ?

    EDIT: Also launching the app as a preview raises an error in the sprite plugin, not the physics one.

    Firebug says :

    Index or size is negative or greater than the allowed amount

    Line 313 Sprite_plugin.js (this.height)

    (with or without the physics behavior applied to the object)

  • Is that using a negative size sprite in the layout view? It should prevent setting a negative size with the set width/height actions, since canvas doesn't support negative sizes.

  • Is that using a negative size sprite in the layout view? It should prevent setting a negative size with the set width/height actions, since canvas doesn't support negative sizes.

    I followed the steps Gonzdevour decribed:

    + Create a sprite

    + Set its auto mirror/flip property value to "Auto Flip"

    + Set the size property from "128, 128" to "-128,-128" (no message preventing it, negative values stand in the property window)

    + Launch a preview, application stays greyed/white background; firebug raise the error described earlier.

  • OK, I've disabled negative widths/heights for next build, neither canvas nor physics support it. For the record: auto-mirror/flip work by the object angle, not the width/height, in Construct 2.

  • <img src="http://dl.dropbox.com/u/31590694/SalarymanTest.jpg" border="0" />

    As the picture above.

    I am trying to make a ragdoll.

    Not like C1 BoneAnimation, a hinged ragdoll has no function to mirror/flip itself,

    so I tried to set image width negative for mirroring the ragdoll parts manually.

    That's why I set width negative in this case.

    Now I know setting height/width negative is an illegal operation,

    however, if you go image editor to set a physic-behavior-sprite mirror/flip,

    like what I did in the picture, it would also cause the bug I've mentioned.

    --

    May C2 be the best!

  • Thanks, I see the problem, should be fixed in the next build!

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