Weighing-machine or Balance ?

May 6, 2009 at 11:05 AM
Hi.

I´ve been using this engine in a platformer game, but know there are some other things that i would like to do, one of those it is a Balance.

And I was wondering if that´s possible with this engine, the purpose would be to teach children the relation between the volume and mass of the objects,
like a rock and a cotton ball, in my aplication there should be a lot of different objects that the kids could put at the balance, and then it would be visible which of the
objects is more heavy.

I was thinking maybe a rectangular platform with a rotating axis in the middle, would the objects with different masses affect the platform ?

Thanks for any help ;)
Coordinator
May 6, 2009 at 4:57 PM
Yep, it is indeed possible to do with this engine. Sounds like a great idea too.

You can use the revolution joint to make the rotating axis in the middle. If you add objects with different mass to the machine, it will tip to the side with the most weight. Have a look at the samples for an easy to use foundation.
May 7, 2009 at 11:30 PM

The revolution Joint works very nice for what i was aiming for, aside for some tweaking it´s almost done, hope to show some of the results soon.
Thanks genbox ;).
May 9, 2009 at 9:03 PM
Edited May 9, 2009 at 9:45 PM

Hi!

I have a sort of a game where the user drags a rectangle with a number to a platform assigned to a group of objects, if the number is the same as the number of objects in that group, then the platform turns green, if not it turns red.

The thing is that this was working perfectly  yesterday by using the event OnCollision and OnSeparation to return the platform to the original color if there is no collision.

Today is not working because the color keeps changing between RED/GREEN and WHITE, like theres always a collision and a separation even when the object is static...

I don´t have a clue why this is happening, please some help, Thanks.

 

EDIT:

Ups, solved it, thanks anyway...

 

Coordinator
May 9, 2009 at 9:34 PM

Because of the design of the engine (and precision of computers), there is a constant collision and seperation between geometries.

Having two geometries next to each other will fire the OnCollision event all the time. But sometimes, the OnSeparation event will also be fired because they stop touching for a update, and then collide again. The geometries are constantly moving from the impulses applied, not much to do about that.

Try averaging the OnCollision and OnSeparation events over 3 updates. It's just an idea. but might be worth trying.

By the way, for each question, create a new discussion. This will attract more people to answer your question and gives a lot more organized posts. :)

May 11, 2009 at 11:14 AM

Hi,

Back to the balance game, im having some troubles in maintaining balance, i have rectangles with numbers and each number is the equivalent to the rectangle mass, so if i put a rectangle with a mass of 5 in one side, and on the other side two rectangles, one with a mass of two and other with a mass of three wich the sum of them both is 5, the balance always tend to some side...

Maybe it´s the lever effect, but i try to put the in the same equidistant position, maybe it´s the precision of the engine because of rectangle´s being on top of each other...

Is it possible to post some images for me to show what´s happening better ?

Thanks !