• Create Account

### #ActualMedo3337

Posted 17 May 2013 - 12:12 PM

@belfegor: Well, your help is one of the main reasons that made me able to accomplish that I'm still doing some improvement so I could upload a video when I finish.

Everyone,

In this screenshot, the sparks looks messed up, because it's getting generated pointing at random direction, then when it move it point at the UP direction (correct direction), this problem is much more noticeable when the particles are moving:

(I think the problem is be more clear in this screenshot)

[attachment=15782:5644.png]

I'm looking for a way to modify the code to make it look at the moving direction when generated.

So my question is: How do I make the particles generate while looking at the gravity direction?

Here is how I generate the particles (I need to update the following code to fix this problem):

D3DXVECTOR3 randVec = getRandVector();
particle.velocity += randVec * 4.0f; // 4.0f = How much spread


Here is how I render the sparks lines:

               // D3DXVECTOR3 lineFrom      D3DXVECTOR3 lineTo
RenderSingleLine( currentParticle.position, currentParticle.position - currentParticle.velocity * lineLength );


### #6Medo3337

Posted 17 May 2013 - 11:55 AM

@belfegor: Well, your help is one of the main reasons that made me able to accomplish that I'm still doing some improvement so I could upload a video when I finish.

Everyone,

In this screenshot, the sparks looks messed up, because it's getting generated pointing at random direction, then when it move it point at the UP direction (correct direction), this problem is much more noticeable when the particles are moving:

[attachment=15779:5644.png]

I'm looking for a way to modify the code to make it look at the moving direction when generated.

So my question is: How do I make the particles generate while looking at the gravity direction?

Here is how I generate the particles (I need to update the following code to fix this problem):

D3DXVECTOR3 randVec = getRandVector();
particle.velocity += randVec * 4.0f; // 4.0f = How much spread


Here is how I render the sparks lines:

               // D3DXVECTOR3 lineFrom      D3DXVECTOR3 lineTo
RenderSingleLine( currentParticle.position, currentParticle.position - currentParticle.velocity * lineLength );


### #5Medo3337

Posted 17 May 2013 - 11:02 AM

@belfegor: Well, your help is one of the main reasons that made me able to accomplish that I'm still doing some improvement so I could upload a video when I finish.

In this screenshot, the sparks looks messed up, because it's getting generated pointing at random direction, then when it move it point at the UP direction (correct direction), this problem is much more noticeable when the particles are moving:

[attachment=15779:5644.png]

I'm looking for a way to modify the code to make it look at the moving direction when generated.

So my question is: How do I make the particles generate while looking at the gravity direction?

Here is how I generate the particles (I need to update the following code to fix this problem):

D3DXVECTOR3 randVec = getRandVector();
particle.velocity += randVec * 4.0f; // 4.0f = How much spread


Here is how I render the sparks lines:

                  // lineFrom Vector3      lineTo Vector3
RenderSingleLine( currentParticle.position, currentParticle.position - currentParticle.velocity * lineLength );


### #4Medo3337

Posted 17 May 2013 - 11:01 AM

@belfegor: Well, your help is one of the main reasons that made me able to accomplish that I'm still doing some improvement so I could upload a video when I finish.

In this screenshot, the sparks looks messed up, because it's getting generated pointing at random direction, then when it move it point at the UP direction (correct direction), this problem is much more noticeable when the particles are moving:

[attachment=15779:5644.png]

I'm looking for a way to modify the code to make it look at the moving direction when generated.

So my question is: How do I make the particles generate while looking at the gravity direction?

Here is how I generate the particles (I need to update the following code to fix this problem):

D3DXVECTOR3 randVec = getRandVector();
particle.velocity += randVec * 4.0f; // 4.0f = How much spread


Here is how I render the sparks lines:

                  // lineFrom Vector3      lineTo Vector3
RenderSingleLine( currentParticle.position, currentParticle.position - currentParticle.velocity * lineLength );


### #3Medo3337

Posted 17 May 2013 - 10:46 AM

@belfegor: Well, your help is one of the main reasons that made me able to accomplish that I'm still doing some improvement so I could upload a video when I finish.

In this screenshot, the sparks looks messed up, because it's getting generated pointing at random direction, then when it move it point at the UP direction (correct direction), this problem is much more noticeable when the particles are moving:

[attachment=15779:5644.png]

I'm looking for a way to modify the code to make it look at the moving direction when generated.

So my question is: How do I make the particles generate while looking at the gravity direction?

Here is how I generate the particles (I need to update the following code to fix this problem):

D3DXVECTOR3 randVec = getRandVector();
particle.velocity += randVec * 4.0f; // 4.0f = How much spread


### #2Medo3337

Posted 17 May 2013 - 10:45 AM

@belfegor: Well, your help is one of the main reasons that made me able to accomplish that I'm still doing some improvement so I could upload a video when I finish.

In this screenshot, the sparks looks messed up, because it's getting generated pointing at random direction, then when it move it point at the UP direction (correct direction), the problem is much more noticeable when the particles are moving:

[attachment=15779:5644.png]

I'm looking for a way to modify the code to make it look at the moving direction when generated.

So my question is: How do I make the particles generate while looking at the gravity direction?

Here is how I generate the particles (I need to update the following code to fix this problem):

D3DXVECTOR3 randVec = getRandVector();
particle.velocity += randVec * 4.0f; // 4.0f = How much spread


PARTNERS