Immovable physics toggle problem

Get help using Construct 2

Post » Sun Jan 04, 2015 1:58 pm

I've got a situation where I want to switch an object's physics between movable & immovable, however there's a problem with this as you can see in the capx. Click on the red sprite to toggle, & the sprite falls through the floor when it becomes movable (this gets worse with each click).

I've tried moving the sprite up 1 pixel before it's set to movable again to avoid overlaps, but that doesn't work. It seems to have no collision with the floor for a few frames. Any ideas for a workaround?
You do not have the required permissions to view the files attached to this post.
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Sun Jan 04, 2015 3:52 pm

I would suggest this is a bug.
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Mon Jan 05, 2015 9:11 pm

I posted this under bugs & Ashley confirmed that it's a limitation of the box2d engine. The same thing happens to a lesser extent with asm.js, so I'm still looking for a workaround. Any ideas?
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Mon Jan 05, 2015 9:23 pm

Well i havent had much of a chance to take a look. You could always take a look at the Chipmunk Physics behavior which is here:
behavior-chipmunk-physics_t110815
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Mon Jan 05, 2015 10:36 pm

An update: I have tried the Chipmunk option and it works as you would expect. I dont know whether this is an option for your project.
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Mon Jan 05, 2015 11:19 pm

Thanks, this sounds great. The post collision trigger stuff should add some interesting new possibilities over the current physics engine. Chipmunk's lack of tilemap support is a problem for me though, but I'm sure Rojohound will get that working in the future.
B
27
S
12
G
1
Posts: 157
Reputation: 3,359


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 35 guests