Hi,
I try to create falling objects from the sky. I use a timer creating a block with body
every second. For the block i'll use a separate class with it's own onEnterFrame handler
It's falling down and it will disappear when it reaches the bottom of the screen. What is
wierd is that every new block will fall faster. Is the gravity (normal 9.8m/s2) become
higher? When I the block is disappearing from the screen I want to remove it from the
parent. Can I do this in the block class with for example self:removeFromParent()?
Thanks,
Marc
Comments
No. are you removing the block at the end with its physics body or just repositioning them at the top again?
Can I do this in the block class with for example self:removeFromParent()?
better to it in the main class and make sure to remove the physics body before
the objects in the main class. Iterating through the
Actors will do finally do the trick.
Regards,
Marc
Likes: hgvyas123