Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


#ActualMedo3337

Posted 18 May 2013 - 07:33 AM

If I give a velocity of (0, 10, 0) I want to get A and B accordingly.

 

0, 10, 0 direction is UP so the result should be the upper quarter.

 

[attachment=15796:circle.png]

 

 

I should change the following line:

float t = GetRandMinMax( -D3DX_PI, D3DX_PI );

To:

float t = GetRandMinMax( A, B );

 

How do I calculate A and B based on the velocity (direction)?


#3Medo3337

Posted 18 May 2013 - 07:31 AM

If I give a velocity of (0, 10, 0) I want to get A and B accordingly.

 

0, 10, 0 direction is UP so the result should be the upper quarter.

 

[attachment=15796:circle.png]

 

 

I should change the following line:

float t = GetRandMinMax( -D3DX_PI, D3DX_PI );

To:

float t = GetRandMinMax( A, B );

 

 


#2Medo3337

Posted 18 May 2013 - 07:30 AM

If I give a velocity of (0, 10, 0) I want to get A and B accordingly.

 

0, 10, 0 direction is UP so the result should be the upper quarter.

 

[attachment=15796:circle.png]

 

 

I should change the following line:

 

float t = GetRandMinMax( -D3DX_PI, D3DX_PI );

To:

 

float t = GetRandMinMax( A, B );

 

 


#1Medo3337

Posted 18 May 2013 - 07:29 AM

If I give a velocity of (0, 10, 0) I want to get A and B accordingly.

 

0, 10, 0 direction is UP so the result should be the upper quarter.

 

[attachment=15796:circle.png]


PARTNERS