Advertisement

Two questions does Newbie Have HMMMM!

Started by April 10, 2001 07:00 AM
0 comments, last by CpMan 23 years, 10 months ago
Question 1: Say I want to have a ship blow up and all its triangles fly out in opposite directions. I know I should make each triangle individual from the others, but when it explodes, do I have to set the world matrix for each triangle each time I want to have one fly off, or is there an equation that I can use to do them all at the same time with one matrix. Question 2: I want to have an explosion that looks like fire. I know that games don''t use triangles for fire, they use single points. What alogorithm should I use to generate an explosion of a certain radius, say the freespace2 kind, a generic sperical explosion?
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
1) It depends on how you define your particles position. I would define their positions relative to the position of the ship when it was killed. This means you just need to translate to the ship position and draw the triangles. On the other hand it may be easier to just initialise each triangle with it''s world position and then translate to each triangles. eg/

for each triangle {
glPushMatrix()
glTranslate(to where the triangle is)
draw...
glPopMatrix()
}

or

glTranslate(to ship pos)
for each triangle{
draw
}

2) Do you want to make a particle emitter. Lots of tutorials on this. You could code a simple one that emitts in all directions at once for an explosion.
Or you could just have an animated textured quad or something.

...just realised I may as well have said
assert(ways_to_skin_cat() >1)

DeVore

This topic is closed to new replies.

Advertisement