I'd like to know how to make a character moving on or inside other objects.
Let's start from the basics. By default, nothing prevents two simulated objects from fully encroaching each other. This is ideal for ghosts and not so ideal for pretty much everything else.
There's no such thing as "moving on or inside". We want to move it on. Or in. Those are two very different things.
So as others have pointed out, you need some sort of collision detection (library) to first prevent encroaching, then find a way to let it happen selectively... or perhaps not? Let me elaborate.
E.g. If I got the model of a house and I want the character to be able to walk on the roof as well as inside the rooms.
Nobody, nobody serious would model a whole house using a single collision shape (physics model). In general, most maps are made of collections of independent convex hulls. This implies there's no such thing as "in the room" but rather "not in something solid".
To be more explicit, you don't move inside of a model but rather
build your model in such a way it has empty space inside
OR
find a way to make the model non-solid selectively.
For moving on top of it, I suppose you need to find the triangle the charactermodel is touching, then get the height of the point inside the triangle.
But how can you get the triangle and how can you do it fast enough in big models?
In line of principle, what you're trying to do is "contact point generation". I have experienced quite some pain with it and I therefore strongly suggest the use of a library.
What other people have not written is that you're going to take a stroll in the beautifully complicated world of kinematic objects (stuff that moves). This is going to require some hair pulling.
Edited by Krohm, 10 September 2012 - 01:58 AM.