Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMedo3337

Posted 18 May 2013 - 08:30 AM

I'm trying to create random vector that points at the velocity (for particles)

 

So I have:

 

D3DXVECTOR3 velocity;

float velocity_var;

 

According to the above variables I want to make the particles generate to move according to the "velocity", however, velocity_var should determine how much the particles will spread.

 

Example 1:

 

Velocity: 0.0f, 10.0f, 0.0f

velocity_var: 4.0f

 

End Point

  \        /

   \      /

    \    /

     \  /

   Start

 

Example 2:

 

Velocity: 0.0f, 10.0f, 0.0f

velocity_var: 0.0f

 

End Point

       |

       |

       |

       |

   Start

 
The above works perfectly, however, since my particles are lines, the lines are not pointed at the velocity when generated and that's what I'm trying to fix.

#1Medo3337

Posted 18 May 2013 - 08:26 AM

I'm trying to create random vector that points at the velocity (for particles)

 

So I have:

 

D3DXVECTOR3 velocity;

float velocity_var;

 

According to the above variables I want to make the particles generate to move according to the "velocity", however, velocity_var should determine how much the particles will spread.

 

Example 1:

 

Velocity: 0.0f, 10.0f, 0.0f

velocity_var: 4.0f

 

End Point

  \        /

   \      /

    \    /

     \  /

   Start

 

Example 2:

 

Velocity: 0.0f, 10.0f, 0.0f

velocity_var: 0.0f

 

End Point

       |

       |

       |

       |

   Start

 
The above works perfectly, however, since my particles are lines, the lines are not pointed at the velocity when generated.

PARTNERS