First, I have a question about how to implement a building environment where a character is moving: should I use a single concave shape to define floor walls and ceiling of a room, or should I use separate convex shapes each one defining a flat panel of the environment (4 different shapes for each wall of a room, other for the floor , etc.).
I guess that computing collisions between convex shapes has to be simpler, but having a lot of shapes can be a nigthmare for the physics library. Any advice?
Second, the btKinematicCharacterController object has a member called setWalkDirection(walkdirection) to define movements of the character. I guessed that the prameter is a distance (not a speed) so before calling stepSimulation I call setWalkDirection using (vector_direction * elapsed_time) as the parameter. The result is that most of the time the character runs smoothly but sometimes seems to speed up. I found that if the elapsed time between frames growths the character moves more quickly in that frame. If I force a grater elapsed_time (for example inserting a sleeping rutine between frames) the character seems to be running a race. Any hint? Is the parameter a distance or a speed ?
Regards,
Slorenzo
Character in a building. Convex or concave walls?
-
- Posts: 5
- Joined: Sun Jul 17, 2005 11:10 pm