-
Notifications
You must be signed in to change notification settings - Fork 55
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
Physic simulation runs twice #29
Comments
To complete @rikardjh's workaround, for particles: if recording {
self.rootNode.particleSystems?.forEach { particle in
particle.speedFactor = particle.speedFactor / 2.0
}
}
else {
self.rootNode.particleSystems?.forEach { particle in
particle.speedFactor = particle.speedFactor * 2.0
}
} |
I am looking for a solution that doesn't require manually manipulating the speed factor. If I can't find in a timeful manner I will add this as a temporary solution. |
@okaris Has there been any progress on this issue or is manually manipulating properties for the recording state still the recommended solution? @Francescu Curious if you’re using this workaround in Arrow. Very fun app by the way! |
I don't remember finding a solution for this. I am no longer maintaining this repo. Maybe @halileohalilei can help. |
@kyleweiner thanks for the kind words 😇 The trick is still used in production for the Arrow app 🙈 |
Looks like it gets the job done for now. Thanks for the info 👍 |
Running with ARKit and rendering a ARSCNView
Issue Details:
Seems like the physic simulation gets run twice, once in the actual sceneView rendering and once in the SCNRenderer when recording. This results in a speedup in any physics-driven motion
Temporary and ugly workaround is to set physic simulation speed to half before recording and restore after recording is finished. (sceneView.scene.physicsWorld.speed = 0.5)
Might be somewhat related to #28
Thanks for a very useful lib!
The text was updated successfully, but these errors were encountered: