Set density before applying force

Bugs will be moved here once resolved.

Post » Fri Jun 22, 2012 11:56 am

Test capx:

https://dl.dropbox.com/u/5779181/fixed_mass.capx

In this capx, I try to set the same mass by setting density, then applying a force.
You could toggle "wait 0.1" to see the different result.
- With "wait 0.1", the mass of these two object is the same, so they move with the same velocity.
- Without "wait 0.1", the density would not be changed, so they move at different velocity.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Sat Jun 23, 2012 6:24 am

I think its because when you change the density Construct destroys the body and recreates it with the new density, so there is bound to be a slight delay before the new body is created and usable.

So without the "wait 0.1" the force is applied to the old body with the old density, and with the "wait 0.1" its applied to the new body with the new density.
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Sat Jun 23, 2012 7:33 am

@CodeMasterMike

Agree.
Users might think the 'set density' is buggy since they don't know this trick (wait 0.1).
One solution is put a notify into manual.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 7 guests