-
Notifications
You must be signed in to change notification settings - Fork 35
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
Repeated updateConfig causes "velocity" change #101
Comments
I'll look into it. Can you give me a few more details on how to recreate this issue? |
Many thanks! Sure I can.
So basically in the application there are different characters which roll
different type and number of dice that is why I have to change the number
and scale of the dice.
I created a service which initializes the dicebox and before each call
check the dice type and number and calls the updateConfig with the new
scale value, the mass and other attributes are untouched on my part.
But after nearly 10 rolls of many dice this velocity issue occures.
Sadly, I cannot share the codebase with you, but will ask about a code
snippet from the service if it is any help.
…On Fri, 14 Jun 2024, 17:01 Frank, ***@***.***> wrote:
I'll look into it. Can you give me a few more details on how to recreate
this issue?
The throwForce and mass of the physics colliders are tied to scale
setting so there might be a math issue that's adding up over time. Dice
twitching might be associated with mass eventually dropping to zero.
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEOG2U5MGCZOYVPRIY4HKCTZHMATFAVCNFSM6AAAAABI5NGWFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRYGIZDMMBXHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yup, I can tell from this demo, where I randomly change the scale, that the |
Looks like you can get around this defect by setting the let Box = new DiceBox("#dice-box", {
assetPath: "assets/",
origin: "https://unpkg.com/@3d-dice/dice-box@1.0.12/dist/",
scale: 6,
throwForce: 5,
spinForce: 6,
gravity: 1,
mass: 1,
}); There seems to be a mixup as to what value should be used as the base value when calculating throwForce. Setting it on initialization keeps the base value stable. Not setting the This seems to also be true for |
Fixed with release of 1.0.13 |
Awesome, thank you so much!
…On Wed, Jun 19, 2024 at 3:12 PM Frank ***@***.***> wrote:
Fixed with release of 1.0.13
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEOG2U3X4IUP2O4BM5TOL6TZIF7T7AVCNFSM6AAAAABI5NGWFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZYGY4TAMJZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I just noticed that I accidentally introduced a bug with the fix in 1.0.13. It was related to scale and how the config options might have been updated with undefined values. I just posted version 1.0.14 to fix this. |
Thank you for the heads up!
…On Thu, 27 Jun 2024, 21:10 Frank, ***@***.***> wrote:
I just noticed that I accidentally introduced a bug with the fix in
1.0.13. It was related to scale and how the config options might have been
updated with undefined values. I just posted version 1.0.14 to fix this.
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEOG2UYHMU23GZPV3QGQ5G3ZJRPQVAVCNFSM6AAAAABI5NGWFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVGQ4DQOBYGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@frankieali If I want to roll different amount of dice each time and rescale them to fit the canvas area and I call updateConfig() the dice seem to be getting "quicker" to the point when they are starting to "twitch" on landing. This behavior appears after a fe hundred dice being rolled consistently for me.
The text was updated successfully, but these errors were encountered: