#### Archived

This topic is now archived and is closed to further replies.

# Collision in 3D world

## Recommended Posts

##### Share on other sites
I''ve formatted it for you using the [code ] [/code ] tags (without the space). The board doesn''t like spaces otherwise.

pete

Original post by Arch
Hi !

I premise that I''m an italian programmer.. so sorry for my english

I have a problem with collision. Suppose we are in a virtual 3D world like a map of Quake, and we have, in front, a column.
Look my ascii:
                  +---A---+                  |SOLID  |      player P->  |COLUMN B                  |       |                  +---C---+

Now if I go ahead, there isn''t problem (I''m using the sphere-plane collision test, where the sphere is the player). In fact I can slid along the wall.

But what happen in the case below:
      player P->                     +---A---+                  |SOLID  |                  |COLUMN B                  |       |                  +---C---+

when the player arrive on the ''A'' wall, he is instantly ''throw out'' because he is too near on the wall..
This is because the corner of the column (but this case can be extended to all other structure, like floor...) isn''t covered by the collision routines...

here is a big ascii that illustrate the situation:

A-B-C-D mark the limit area for the player (is the radius of the sphere...); so I can slide to these hypothetical walls... the problem occur when I go against the column entering by a corner...
                                              P   the player will ''throw out'' by the collision routine                                             *                    _________A__________  | *                                           +--                     +------------------+                  |   |                  |   |                |   |                  |   |                |   |                  |   |                D   |    COLUMN        |   B                |   |                  |   |                |   |                  |   |<--P  there isn''t problem, the player can slide....                |   |                  |   |                |   |                  |   |                    +------------------+                    _________C__________

Thanks

• ### Forum Statistics

• Total Topics
628350
• Total Posts
2982211

• 10
• 9
• 24
• 11
• 9