Julio Jerez wrote:should the player ever move other bodies?
I'm no user of player controller, but to make it most flexible, maybe it's good to do a callback for any body that comes in contact?
Then the user knows all contacting bodies (which is always good), and can return some options for each:
Moving Behaviour (example for behaviour walking over bridge from demo):
1. Move the body without slowing down the player
(bridge receives responce from player - player may push bridge down and follows due to gravity,
but bridge can't get back up because player is static obstacle - bad for this case)
2. Move the Body but slow player down by mass / force ratio
(dynamic interaction between player and bridge in both directions - nice)
3. Never move the body
(bridge does not start to swing - ok but boring for this case)
Stepping Behaviour :
1. Step over if possible - else try to move
2. Try to move - else try to step over
3. Never step over (so try to move)
The default option would be 2. each for my taste.
I still have doupts it's possible to make a player controller that works good in any case and makes everyone happy
