Calculating collisions, and wind
How can I calculate the following using my open gl program. (note: I would prefer not to use a library that already supports this unless its extremely good)
I want to know how you do collisions of 3D models because of all the different polygons it requires to make a sprite.
I also would like to know how you can detect the collision of a particle and the user in 3D space.
I also need to know how exactly someone goes about simulating a storm in a 3D game because id like to make it so the rain looks real and there is a direction I want the wind to blow the rain as well as slow the user. Sort of like a big wind storm or a "hurricane."
Don''t click me!
Killer Eagle Software
Hey, that''s an awful lot of questions for one thread! And they''re all very big questions. Why don''t you separate them into three different threads?
Actually, I''ll give a quick answer to one of them here. How to find the collision of a particle with the user in 3D space. I assume you mean the collision of a particle and the player''s character or vehicle of some sort? The general approach is this:
1) find the position of the particle relative to the player''s character object at the previous frame, and call it P1.
2) find the position of the particle relative to the player''s character object at the current frame, and call it P2.
3) Find the intersection of the line segment from P1 to P2 with the player''s character object. You can do this either by intersecting the line segment with individual triangles or something simpler, such as intersecting the line segment with a bounding sphere around the player''s object.
4) The point of intersection, if it exists, is the collision point.
Final note. P1 and P2 need to be represented in the coordinate system of the character object if you want to collide the particle with the mesh. If you use a bounding sphere, you can do everything in world coordinates. If you do things in the object''s coordinate system you will need to transform the collision point back to world coordinates in order to deflect/move the particle.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Actually, I''ll give a quick answer to one of them here. How to find the collision of a particle with the user in 3D space. I assume you mean the collision of a particle and the player''s character or vehicle of some sort? The general approach is this:
1) find the position of the particle relative to the player''s character object at the previous frame, and call it P1.
2) find the position of the particle relative to the player''s character object at the current frame, and call it P2.
3) Find the intersection of the line segment from P1 to P2 with the player''s character object. You can do this either by intersecting the line segment with individual triangles or something simpler, such as intersecting the line segment with a bounding sphere around the player''s object.
4) The point of intersection, if it exists, is the collision point.
Final note. P1 and P2 need to be represented in the coordinate system of the character object if you want to collide the particle with the mesh. If you use a bounding sphere, you can do everything in world coordinates. If you do things in the object''s coordinate system you will need to transform the collision point back to world coordinates in order to deflect/move the particle.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
dev dev the question man 
so...
collision detection is a GIANT topic. You should go to the Articles & Resources section of the site and read, read, read. There are tens of articles on collision detection and you should read all of them. As a note you are going to need a decent base in Linear Algebra to fully understand them so i'd suggest googling for some Linear Algebra tutorials if you start getting lost in the math.
i think wind effecting rain was covered in your last thread about how to make realistic rain:
http://www.gamedev.net/community/forums/topic.asp?topic_id=125284
i believe the rain solutions covered in that thread involved making a particle system which is also covered in the Articles & Resources section.
time to get your learn on
-me
[edited by - Palidine on November 27, 2002 2:34:53 PM]

so...
collision detection is a GIANT topic. You should go to the Articles & Resources section of the site and read, read, read. There are tens of articles on collision detection and you should read all of them. As a note you are going to need a decent base in Linear Algebra to fully understand them so i'd suggest googling for some Linear Algebra tutorials if you start getting lost in the math.
i think wind effecting rain was covered in your last thread about how to make realistic rain:
http://www.gamedev.net/community/forums/topic.asp?topic_id=125284
i believe the rain solutions covered in that thread involved making a particle system which is also covered in the Articles & Resources section.
time to get your learn on

-me
[edited by - Palidine on November 27, 2002 2:34:53 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement