Per object gravity?

I was just wondering if it was possible for objects to have their own gravity independent of other objects?
So I could have one object that has a gravity of 4 and another with a gravity of 1.

Thanks [import]uid: 22824 topic_id: 8545 reply_id: 308545[/import]

No, gravity is a universal settings (as in real life!)… however, you can modify the densities of physical objects which would affect gravity in a way.

Another solution might be to attach an enterFrame listener to an object, and have it move down a specific number of pixels every frame (the more you have it move, the faster it’ll move down–which would make it seem as though it has more gravity than other objects).

Hope that helps! [import]uid: 52430 topic_id: 8545 reply_id: 32237[/import]

Modifying density can make an object float??, what can make an object so light that goes in opposite direction than gravity force?.. [import]uid: 74502 topic_id: 8545 reply_id: 46078[/import]

Are you looking for something like a balloon? If so, you could use apply force along with an enterframe listener. Just use negative number for the apply force in the y axis. Depending on your density and this force level you can make things counter gravity. Fun to toy around with. [import]uid: 10361 topic_id: 8545 reply_id: 46093[/import]

Thx! is there an example of this somewhere? im a newbie in lua and Corona and this is the key for what im doing, an object that is constantly going up (bubble). Thx again! [import]uid: 74502 topic_id: 8545 reply_id: 46157[/import]

Heh, I wanted it for the same reason. :slight_smile: I ended up just setting gravity as a negative value, and applying forces for different speeds. [import]uid: 22824 topic_id: 8545 reply_id: 46190[/import]