bug with physics consilion

Get help using Construct 2

Post » Fri Apr 05, 2013 11:00 am

Hello
I made a rotating box with little boxes (like a sand) in it , when I rotate the main box the physics consilion stops work and little boxes are falling trough the walls of main box.
please se link

https://www.dropbox.com/s/g9rjy5py0rw6ujb/labir.capx


Thank you.
B
13
S
3
G
3
Posts: 28
Reputation: 2,798

Post » Fri Apr 05, 2013 12:21 pm

This isn't a bug.

When you use apply the physics behaviour to an object, any other motion you give it directly conflicts with the physics. You're basically telling C2 "this object is bound by the laws of physics", and also "spin this object because I said so" - which are conflicting messages.

First, you should use the "apply torque" action to rotate your lab instead of simply rotating the sprite. But this requires that you set immovable to no, which is obviously a bit of an issue because the lab would collapse to the ground. I'd suggest that you create a new, invisible or visible, non-collidable object (a "pin" so to speak) and bind the lab to that with a revolute joint. Set the pin to be immovable, effectively trapping the lab in place but allowing it to rotate freely.

You should also alter the density of your sand and lab objects to better represent their approximate mass in the real world (so the sand doesn't "push" around the lab).

Here's an updated capx for you.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Fri Apr 05, 2013 9:23 pm

@geometrix

I have same questions too . can you add me skype or FB.
B
13
S
3
G
3
Posts: 28
Reputation: 2,798

Post » Fri Apr 05, 2013 9:31 pm

I understand all.

but when i use "apply torque" my box "lab" having same inertion
ex. when I pressed down key (10 times) and stop pressed, then my box still rotating. but must be stoped.

and when I have rotating whit "apply torque" speedly (set angleT value > 50000) little boxes are falling trough the walls of main box.
B
13
S
3
G
3
Posts: 28
Reputation: 2,798


Return to How do I....?

Who is online

Users browsing this forum: michaelverdi and 29 guests