Jump to content

Speed based variables


ParaToxic
 Share

Recommended Posts

Hey ya,

I have a question about the functions AppSpeed() and AppTime().So I use right now the AppSpeed() command to make some effects time or speed based ,so it runs with 190 FPS and with 60 equal,but it doesn't.

For example I have this line of code:

weapon->VC3_rotationsmooth.Z = Curve(-0.05 * AppSpeed(),weapon->VC3_rotationsmooth.Z,5.0);

 

It is a simple Effect function for recoil of the weapon.So I had with 190 FPS the value Curve(-0.06....) and everything worked fine,but then I set the Vsync mode and it was only sh**.

The version with * AppSpeed() don't work well ,because it's not equal with 190 FPS , 60 FPS or 40 FPS,so what to do?

 

Is there a way to adjust all values with 60 FPS,so that AppSpeed is 1.0 ,and have the same result at 190 FPs or 40 FPs etc.??

 

Thank you

Link to comment
Share on other sites

Thanks ,but things like :

_slotManager->_weaponSlot[_slotManager->i_currentSlot]->_currentWeapon->VC3_rotationsmooth.X += VC3_drag.X/3000.0f / AppSpeed();
_slotManager->_weaponSlot[_slotManager->i_currentSlot]->_currentWeapon->VC3_rotationsmooth.Y += -VC3_drag.Y/800.0f / AppSpeed();

 

???? is that right?

Link to comment
Share on other sites

So there isn't a way to make a macro or something like that and add it allways to the values to have a speed based effect ?

The 2 lines above makes that the weapon going to be draged when the player going to be draged,but divided with 2000 and 800 for a little moving effect.

Link to comment
Share on other sites

In most cases you will multiply a value by AppSpeed() to make it time-modulated. In the case of the Curve function, the number being sent to the function is the denominator, so you divide it by the AppSpeed() (in effect, multiplying the numerator by AppSpeed()).

 

I don't understand your question beyond that, but that's how it's meant to be used.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...