rico wrote:- I want to have my main character, and possibly some enemy characters represented by a polygon outline. Maybe even a box. However currently boxes tip when they reach the edge of platforms I want my box to not rotate at all and also to be able to stay on the platform until the last corner is no longer in contact with the platform. How Can I make a box which will not rotate? This is also good because I do not want my main character to tip up at an angle when going up slopes. I can also think of other features in the game which could use non-rotating boxes. I have thought of using a circle but these fall off platforms early too! (when you walk off a platform i want my man to stay on the platform until the last part of him is no longer in contact with the platform)
You can achieve this by setting the moment of inertia of a cpBody (the moment of inertia is the second parameter to cpBodyNew()) to INFINITY. The object will then never rotate ever.
rico wrote:- I want to have automatic doors which open by sliding into the walls. Hence they are like a thin rectangle which gets shorter each frame (while they are opening). How can I implement this in Chipmunk? (i don't need code just an idea of what technique to use)
You mean like the boss doors in Mega Man? It's generally not good to change the collision bounds of an object, so my best advice would be to make it slide up into the wall above it. You'll have to make sure that the wall and the door don't collide. You can do that by putting them in different collision layers or using a collision pair function.
rico wrote:- I would like to do moving platforms (like all good platform games

). What commands should I use to do these. Won't these rotate round when something lands on them? How can I fix them in place so they don't rotate but can still move?
Again, by setting the moment of inertia to INFINITY, it's not going to rotate, and you can still move the object. However, it's still going to be affected by other bodies in the same space, so if your character lands on top of it, it's going to start moving downward. for this, you're going to have to set the platform's mass (which is the first parameter to cpBodyNew()) to INFINITY as well. Then, for each frame, you're going to have to manually calculate the position, and velocity manually each frame. I think it should be fine if you leave the acceleration at 0, as long as the platform has a constant velocity, but that might cause some problems when the platform changes direction. You'll just have to test it and see.