Archived

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

Arch

Collision in a 3D World

Recommended Posts

Arch    122
Hi ! I premise that I'm an italian programmer.. so sorry for my english PLEASE PLEASE PLEASE HELP ME !! :\ 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__________ Please help me !! Thanks my e-mail adress is: marcomarco8@virgilio.it [edited by - Arch on March 8, 2003 4:22:24 AM]

Share this post


Link to post
Share on other sites
Cedric    158
Use the [ code ] and [ /code ] tags (without the spaces) before and after your ASCII diagrams, or else, well, you''ve already seen what happens.

Cédric

Share this post


Link to post
Share on other sites
ShmeeBegek    196

I suggest you use boxes / cubes for you''re columns, it would make this a lot simpler (especially if you have the player represented by a box/cube).

~SPH

Share this post


Link to post
Share on other sites