For example an air hockey game?
Or can the physics only be used from a “side view”? [import]uid: 8353 topic_id: 2193 reply_id: 302193[/import]
- yes
- no
Physics wise, games with a side view usually have a gravitiy active towards the bottom of the screen. But it doesn’t have to be like that. So don’t use gravitiy and you should be fine. [import]uid: 5712 topic_id: 2193 reply_id: 6632[/import]
Thanks.
How can gravity be disabled?
[import]uid: 8353 topic_id: 2193 reply_id: 6635[/import]
You set gravity with this command: physics.setGravity( x, y )
So probably if you do physics.setGravity( 0, 0 ) you’ll have no gravity – just a guess because I haven’t actually done it, but give it a shot and see what happens. 
J. A. Whye
[import]uid: 9440 topic_id: 2193 reply_id: 6637[/import]
Yes, that works. Thanks. [import]uid: 8353 topic_id: 2193 reply_id: 6638[/import]
Would it be difficult to set gravity to an object?
(I suspect as much, if one were able to set x to the object’s location, no?)
And would it be possible to have the y value increase, respective of the distance an object was away from this gravity point?
(I suspect as much as well)
-Ed [import]uid: 10178 topic_id: 2193 reply_id: 8391[/import]
Hi Ed,
you can’t set gravitiy to a single object, just to the whole simulation. BUT… you can have a constant force (that’s what gravity is) acting on your object every frame via an “enterFrame” event listener.
Cheers
Michael [import]uid: 5712 topic_id: 2193 reply_id: 8393[/import]
I wish it did support gravity/attraction on specific objects. That way you could create gravity wells etc (like in Orbital).
I guess you could do it programmatically based on proximity but that sounds like too much work! [import]uid: 8353 topic_id: 2193 reply_id: 8398[/import]
Is something like this supported by Box2D (Corona’s physic engine)? If yes, then it can be requested. [import]uid: 5712 topic_id: 2193 reply_id: 8400[/import]
. [import]uid: 5712 topic_id: 2193 reply_id: 8401[/import]
Can you give an example Mike? I’d like to give different objects the ability to attract or repel another object based on proximity. Is this possible using enterFrame? [import]uid: 15615 topic_id: 2193 reply_id: 17067[/import]
"I wish it did support gravity/attraction on specific objects. That way you could create gravity wells etc (like in Orbital).
I guess you could do it programmatically based on proximity but that sounds like too much work!"
Then take a look at Particle Candy. I think it does exactly what you want. I can’t believe I bought it and haven’t had a chance to throroughly play with it 
[import]uid: 10835 topic_id: 2193 reply_id: 17095[/import]
gravity/attraction…
Attach a collision sensor to the gravity well image.
When the gravity well sensors a collision have it apply a force to the object pointed towards the centre of the gravity well.
What you can do is calc the dist from the object to the centre of the gravity well and use the distance as a multiplier on the force. That way the event horizon would be escapable but the centre would not be. [import]uid: 5354 topic_id: 2193 reply_id: 17249[/import]