Ids returned by BodyInterface.CreateAndAddBody appear to be overwritten #265
Unanswered
GeorgePetri
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This is unfortunately a limitation of the way that these bindings are generated (through webidl_binder). Any object that is returned by Line 1935 in 0a5d19c will not allocate a new JavaScript object on return but will store the value in a temporary that is valid until the next call to the same function. You could change your ...
const id = joltInterface
.GetPhysicsSystem()
.GetBodyInterface()
.CreateAndAddBody(creationSettings, Jolt.EActivation_Activate);
return new jolt.BodyID(id.GetIndexAndSequenceNumber()); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I made a repo that reproduces the issue
It looks like later invocations of createAndAddBody update previous Ids, this makes it difficult do manage the body Ids in ecs.
Please take a look.
Thanks,
George
Beta Was this translation helpful? Give feedback.
All reactions