-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make GFX match physics speed #3138
Conversation
This may take a bit more than i expected since dustpool.cpp seems to not be able to be slowed down/sped up at all and may require some extensive modification. |
Hello there, this is an unusually ambitious project for a guest developer, I like it. To be honest I don't know how OGRE's particle system is used properly - our dustpool seems to literally reserve a pool of 100
If you use Discord, come visit our #dev channel: https://discord.com/channels/136544456244461568/189904947649708032 |
As i expected, it works only partially. The smoke follows physics speed but doesn't stop when you stop them, sparks seem to be slowed down but something looks wrong (don't know what exactly) and all the other particles are completely unaffected. I'm trying to figure out why. |
Hmm, I guess we must do this:
or just |
I have no idea why, but it has no effect. |
Found the problem. GFXScene only updates the particles if the physics aren't stopped. |
80b5c6d
to
f136784
Compare
I noticed beacons run when game is paused and also ignore simulation speed, always running at wall time. I remembered there are multiple other issues like this (props/water waves moving when paused) and I figured a way to tackle everything at once - I changed the time input for the entire scene update code (which is already consolidated into `GfxScene::UpdateScene()`) - instead of inputting wall time, I now input the adjusted simulation time, and I input zero if the game is paused or physics are globally paused. The particles had a custom code to correctly calc. sim. time and skip the update entirely when paused. I reverted all that, expecting the adjusted time input to fix particles, but that didn't work. I already researched this at RigsOfRods#3138 and figured to use `Ogre::ParticleSystem::setSpeedFactor()` - that did the trick.
I noticed beacons run when game is paused and also ignore simulation speed, always running at wall time. I remembered there are multiple other issues like this (props/water waves moving when paused) and I figured a way to tackle everything at once - I changed the time input for the entire scene update code (which is already consolidated into `GfxScene::UpdateScene()`) - instead of inputting wall time, I now input the adjusted simulation time, and I input zero if the game is paused or physics are globally paused. The particles had a custom code to correctly calc. sim. time and skip the update entirely when paused. I reverted all that, expecting the adjusted time input to fix particles, but that didn't work. I already researched this at RigsOfRods#3138 and figured to use `Ogre::ParticleSystem::setSpeedFactor()` - that did the trick.
Closing in favor of #3170 |
I noticed beacons run when game is paused and also ignore simulation speed, always running at wall time. I remembered there are multiple other issues like this (props/water waves moving when paused) and I figured a way to tackle everything at once - I changed the time input for the entire scene update code (which is already consolidated into `GfxScene::UpdateScene()`) - instead of inputting wall time, I now input the adjusted simulation time, and I input zero if the game is paused or physics are globally paused. The particles had a custom code to correctly calc. sim. time and skip the update entirely when paused. I reverted all that, expecting the adjusted time input to fix particles, but that didn't work. I already researched this at RigsOfRods#3138 and figured to use `Ogre::ParticleSystem::setSpeedFactor()` - that did the trick.
I noticed beacons run when game is paused and also ignore simulation speed, always running at wall time. I remembered there are multiple other issues like this (props/water waves moving when paused) and I figured a way to tackle everything at once - I changed the time input for the entire scene update code (which is already consolidated into `GfxScene::UpdateScene()`) - instead of inputting wall time, I now input the adjusted simulation time, and I input zero if the game is paused or physics are globally paused. The particles had a custom code to correctly calc. sim. time and skip the update entirely when paused. I reverted all that, expecting the adjusted time input to fix particles, but that didn't work. I already researched this at #3138 and figured to use `Ogre::ParticleSystem::setSpeedFactor()` - that did the trick.
Progress: