showOverlay.scene help

i was wondering if the physical object from the overlay scene will collide with an object from the scene that is being overlapped
and my isModal does not work
or maybe i dont use it in the right place

thanks
vadim [import]uid: 218976 topic_id: 36219 reply_id: 336219[/import]

Yes, your physics objects will collide if they have the same location, unless you set collision filters to avoid it. This is because the display objects will likely have the same mathematical origin (0,0) and so their physics bodies will have the same origin. Although the parent group of each can be moved, the parent group’s location is not taken into account when calculating values on the physics bodies and so the physics bodies are still, effectively, in the same location and will collide. [import]uid: 8271 topic_id: 36219 reply_id: 143871[/import]

so if i make a static object like ground on the bottom of the screen on one scene and a dynamic object on the top of the screen on overlay scene and turn on gravity the object from the top of the screen will fall and hit the object on the bottom of the screen? [import]uid: 218976 topic_id: 36219 reply_id: 143873[/import]

Yes. Have you tried it? [import]uid: 8271 topic_id: 36219 reply_id: 143875[/import]

no not yet. first thing in the morning i will try. how about functions? will functions still work for the scene that is overlapped? like making the object move and whatnot? [import]uid: 218976 topic_id: 36219 reply_id: 143877[/import]

Yes. The problem isn’t what you’ve got, it’s how the physics engine processes things. So yes, functions are just code segments you can call if you have the appropriate scope for them. These are concepts you should read up on - the documentation section can help a lot, plus there’s plenty of really good resources for learning Lua. Also, Robert Ierusalimschy has recently published the third edition of Programming in Lua. [import]uid: 8271 topic_id: 36219 reply_id: 143934[/import]

Yes, your physics objects will collide if they have the same location, unless you set collision filters to avoid it. This is because the display objects will likely have the same mathematical origin (0,0) and so their physics bodies will have the same origin. Although the parent group of each can be moved, the parent group’s location is not taken into account when calculating values on the physics bodies and so the physics bodies are still, effectively, in the same location and will collide. [import]uid: 8271 topic_id: 36219 reply_id: 143871[/import]

so if i make a static object like ground on the bottom of the screen on one scene and a dynamic object on the top of the screen on overlay scene and turn on gravity the object from the top of the screen will fall and hit the object on the bottom of the screen? [import]uid: 218976 topic_id: 36219 reply_id: 143873[/import]

Yes. Have you tried it? [import]uid: 8271 topic_id: 36219 reply_id: 143875[/import]

no not yet. first thing in the morning i will try. how about functions? will functions still work for the scene that is overlapped? like making the object move and whatnot? [import]uid: 218976 topic_id: 36219 reply_id: 143877[/import]

Yes. The problem isn’t what you’ve got, it’s how the physics engine processes things. So yes, functions are just code segments you can call if you have the appropriate scope for them. These are concepts you should read up on - the documentation section can help a lot, plus there’s plenty of really good resources for learning Lua. Also, Robert Ierusalimschy has recently published the third edition of Programming in Lua. [import]uid: 8271 topic_id: 36219 reply_id: 143934[/import]

Yes, your physics objects will collide if they have the same location, unless you set collision filters to avoid it. This is because the display objects will likely have the same mathematical origin (0,0) and so their physics bodies will have the same origin. Although the parent group of each can be moved, the parent group’s location is not taken into account when calculating values on the physics bodies and so the physics bodies are still, effectively, in the same location and will collide. [import]uid: 8271 topic_id: 36219 reply_id: 143871[/import]

so if i make a static object like ground on the bottom of the screen on one scene and a dynamic object on the top of the screen on overlay scene and turn on gravity the object from the top of the screen will fall and hit the object on the bottom of the screen? [import]uid: 218976 topic_id: 36219 reply_id: 143873[/import]

Yes. Have you tried it? [import]uid: 8271 topic_id: 36219 reply_id: 143875[/import]

no not yet. first thing in the morning i will try. how about functions? will functions still work for the scene that is overlapped? like making the object move and whatnot? [import]uid: 218976 topic_id: 36219 reply_id: 143877[/import]

Yes. The problem isn’t what you’ve got, it’s how the physics engine processes things. So yes, functions are just code segments you can call if you have the appropriate scope for them. These are concepts you should read up on - the documentation section can help a lot, plus there’s plenty of really good resources for learning Lua. Also, Robert Ierusalimschy has recently published the third edition of Programming in Lua. [import]uid: 8271 topic_id: 36219 reply_id: 143934[/import]

Yes, your physics objects will collide if they have the same location, unless you set collision filters to avoid it. This is because the display objects will likely have the same mathematical origin (0,0) and so their physics bodies will have the same origin. Although the parent group of each can be moved, the parent group’s location is not taken into account when calculating values on the physics bodies and so the physics bodies are still, effectively, in the same location and will collide. [import]uid: 8271 topic_id: 36219 reply_id: 143871[/import]

so if i make a static object like ground on the bottom of the screen on one scene and a dynamic object on the top of the screen on overlay scene and turn on gravity the object from the top of the screen will fall and hit the object on the bottom of the screen? [import]uid: 218976 topic_id: 36219 reply_id: 143873[/import]

Yes. Have you tried it? [import]uid: 8271 topic_id: 36219 reply_id: 143875[/import]

no not yet. first thing in the morning i will try. how about functions? will functions still work for the scene that is overlapped? like making the object move and whatnot? [import]uid: 218976 topic_id: 36219 reply_id: 143877[/import]