Archived

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

cyanide

the walls mean stop? don't they?

Recommended Posts

cyanide    148
hi, i''ve been experimenting with nehe''s lesson 10 and 23, but one thing i can''t get to work is the clipping. like i pass straight thru the walls without being stopped. like is there any way to stop passing thru'' the walls, i''ve tried using the glpickmatrix function, but it only works in one direction and is not very accurate. what can be the other way of implementing this... cyanide

Share this post


Link to post
Share on other sites
NeoGL    122
I hate to break the news to you, but there is a whole separate world called collision detection and it is not a function of the API, you would have to write your own routines for banging your head against the walls.

NeoGL

Share this post


Link to post
Share on other sites
zedzeek    529
and even more bad news "it is the most difficult thing to do in a game", though walls aint to bad

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
hi,
well then where can i get it?
like in simple plain english? a tut for that matter? i''m new to opengl

BTW Neogl: if you know something more it doesn''t neccesarily mean that you have to be rude...??



Greetz from the "CYANIDE"
http://www.sanchit.8m.com/

Share this post


Link to post
Share on other sites
okapota    122
he wasnt rude at all.
ok, i suggest u to write your own CD rutins, all u need to know is intersections testing, its a math thing, look it up on the net.

Share this post


Link to post
Share on other sites
a2k    124
yeah, he wasn''t rude.

do a search in the programming resources for "collision detection" or "physics." i used Chris Hecker''s physics tutorials to help me write collision detection, but it might be too much for the game you''re doing. i''m not sure what you''re doing, but i''m doing a simulation, so it was necessary. good luck.

a2k

Share this post


Link to post
Share on other sites
cyanide    148
hi,
thanks for all the advice.
and yup! sorry neo, you weren''t rude.
because of my bad english (i''m not an indian) and the phrase "banging your head against the walls" made me a slightly confused. lol

thanks again,
san.

Greetz from the "CYANIDE"
http://www.sanchit.8m.com/

Share this post


Link to post
Share on other sites
oglman    122
But what are some websites that feature good tutorials for collision detection on walls!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?




Open mouth, insert foot

Share this post


Link to post
Share on other sites
mars_888    122
You probably won''t go far wrong if you check here:
www.flipcode.com
It has lots of tutorials and articles on all kinds of things. I think there are enough about colission detection too.

Share this post


Link to post
Share on other sites
mrbastard    1577
I remember NeHe posted news about a basic collision detection demo. Its dead easy and can be found here (i think): http://welcome.to/BiendschmofansTutorialsOfOGLGlander

basicly it works like this:

dist = GetDistance; //write a func to return tha distance between objs using trig/pythag
if (dist <= 0)
{
collision = true
}

Share this post


Link to post
Share on other sites
oglman    122
okay...

I read every single tutorial on collision detection and response at flipcode.com. The thing is, they don't provide any source code other than little chunks with classes like "GLVertex" that already have normals and stuff defined, unfortunatly I am such a dumbass that I can't write these classes myself!! So I was wondering if there were any good sites with sample source on collision detection any help would be greatly appreciated.

{And if you don't help me I'll post that picture again)




Open mouth, insert foot

Edited by - oglman on November 4, 2000 5:48:55 PM

Share this post


Link to post
Share on other sites
cyanide    148
yup!
i read the source code about those sphere but how can i implement this in lesson 10 or 23 i don''t know? please anyone with some source code post it here.
any help would be appreciated!

thanks in advance.


Greetz from the "CYANIDE"
http://www.sanchit.8m.com/

Share this post


Link to post
Share on other sites