|
| | #1 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 228
+9 Internets | math help What do I need to know for the following? I am trying to build a particle system with various effects. I have a fireworks like explosion, but trying to get a 'cone' effect is a little rougher for me right now. I want to be able to pass the direction of the cone (between 1 and 360 degrees) the intensity of the particles (how fast they shoot out of the emitter), and the degree of the cone mouth (for example, the particles can be shot anywhere from 10 degrees to 25 degrees from the emitter) I am using XNA right now, so I have a position vector, and velocity vector, how would I come up with the velocity vector? Tried a few things but not sure what type of math is involved ![]() Can anyone point me in the right direction? |
| | |
| | #2 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 228
+9 Internets | Think i got it; Code:
Code:
I guess the next step is to make an enum to make it easier to fire "Up, Right, Down, Left, Up/Right, Up/Left" etc etc ![]() Last edited by Cloud9_ : 05-20-2008 at 02:28 PM. |
| | |
| | #3 (permalink) |
| Conquest Join Date: Mar 2002 Location: Switzerland
Posts: 4,691
+11 Internets | I am not sure what you want to do, but currently the particle distribution is homogenous in the angle, so depending on what you are trying to do, it might look better if there is a higher particle density in the middle. There are probably dozens of clever way to code that, but here is a brute force dumb way to do it I think: Code:
__________________ -retrosabotage- Last edited by Szlia : 05-21-2008 at 10:00 PM. |
| | |
| | #4 (permalink) | |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 228
+9 Internets | Quote:
![]() | |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |