So I have this problem where I add physics into my game and then my player starts to appear multiple times. As soon as I get rid of the physics my player stays as 1 and no duplicates appear. I am using the code that is in the corona library as requiring it and adding a physics.addbody to the player.
Well I can tell you with 100% certainty the physics.* library is not the problem.
Your code must be doing something in response to physics events or otherwise to create new players.
However, since you have included no code it is hard to know what is going on.
My guess is you’ve got quite a lot of code and aren’t sure where the issue is, so the best way to proceed to a solution is to:
- Get a mentor who can look at your code.
OR
- Zip up the whole project and attach it below in a response. Then, if someone here has the time, they may look at the project and help you work out the issue.
OR
- Start over and practice using physics bodies and listeners to do ‘experiments’. i.e. forget about making a game. Make a toy first to learn the Corona SDK.
Well I can tell you with 100% certainty the physics.* library is not the problem.
Your code must be doing something in response to physics events or otherwise to create new players.
However, since you have included no code it is hard to know what is going on.
My guess is you’ve got quite a lot of code and aren’t sure where the issue is, so the best way to proceed to a solution is to:
- Get a mentor who can look at your code.
OR
- Zip up the whole project and attach it below in a response. Then, if someone here has the time, they may look at the project and help you work out the issue.
OR
- Start over and practice using physics bodies and listeners to do ‘experiments’. i.e. forget about making a game. Make a toy first to learn the Corona SDK.