listener conflict ?

I’ll try…  let’s go through the body types.

"static" - This body is placed once and assumed to never move.  So moving it is a bad idea.  It may work, but I wouldn’t rely on the physics body moving with the visible part (the display object).

"kinematic" - As you noted, these bodies can move at a fixed velocity, but they do not respond to forces nor do they exhibit a collision response.  That is objects colliding with them do not have any impact on the kinematic object’s body motion. 

Additionally, although it is generally frowned upon (although sometimes it is the only solution), you can move the display object by changing the x and y values.  

The reason setting x,y is frowned upon is because it moves the display object only.  The physics engine must detect this and adjust.  It isn’t the same as the body being moved by the physics system.  

By default, physics bodies are allowed to sleep.  This reduces the processing load of the physics engine.

If the body falls asleep and you manually update the display object position, the body may be stuck in the old position.

When you know you may be manually adjusting the position of kinematic bodied display object, you should set obj.isSleepingAllowed = false.  i.e. Don’t go to sleep.

Warning: DO NOT do this on all objects or your performance may tank.

"dynamic" - This is the most common body type.  However because they respond to forces and exhibit collision responses, they are not suitable for things like pong paddles, etc.  i.e. Objects that you wish to have NOT move on collision simply cannot be dynamic.

thank you that was very useful.

now I don’t really want Corona developers throwing stones at me in the streets of Sydney simply because I set x and y on a kinetic object so how would YOU do it ?

as in a few volleyball players on a 2d field (vertical where the gravity changes everytime one side touches the ball) where most collisions occur between the ball and the players. but sometimes 2 players collide and I would like to make them fall over

Hi.  Sorry, but I have very limited time this week so I’m going to have to let someone else answer your extended question.

I will say however, “experiment and find what works best for you.”  The beauty of Corona is it is flexible.  

no no thank you ! I was not expecting you to develop code for me ! :slight_smile:

After my first post i did manage to get it to work by declaring another object/player that’s dynamic and that follows the static. so it would detect other players. very ugly !

so I’ll stick to the insomniac kinematic object !  

thank you again.

Hi.  I wasn’t implying that you wanted me to code it for you.  :)  I should have been more clear.  

I think that the solution will be somewhat custom to your situation and thus any advice I might give on specific implementation may be counter-productive.  However, if someone who better understood your question or had better insights wanted to answer, then they should.

Thanks,

Ed

PS - Also, remember, that I said moving manually is frowned upon, but in fact that is sometimes the exact right solution.  As I have said in the past, “The right solution is the one that you understand and that works best for the problem you are trying to solve.”