[r58] Physics Behavior failed after mirror/flip

Bugs will be moved here once resolved.

Post » Mon Sep 26, 2011 1:52 pm

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.
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Mon Sep 26, 2011 1:54 pm

And if you create hinge on those mirrored/flipped sprites, the game will crash.
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Mon Sep 26, 2011 3:11 pm

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)Kyatric2011-09-26 15:18:15
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Mon Sep 26, 2011 4:50 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Mon Sep 26, 2011 4:56 pm

[QUOTE=Ashley] 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.[/QUOTE]

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.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Mon Sep 26, 2011 5:13 pm

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.Ashley2011-09-26 17:13:37
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Tue Sep 27, 2011 12:43 am



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!gonzdevour2011-09-27 00:48:48
B
106
S
27
G
8
Posts: 209
Reputation: 12,525

Post » Tue Sep 27, 2011 1:18 pm

Thanks, I see the problem, should be fixed in the next build!
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests