Ability to manually create a Contact (for serialization purposes) #564
Replies: 4 comments 1 reply
-
Hmm... in what ways are contacts not caches? That's a question I need to consider. In the past, I'd been of the position that they're only caches. With the exception of the ability for users to tweak contacts via functions like How important are persisting those tweaks for serialization? Presumably, they're important for your use. I also wonder how exact the reproduction of contacts is when serializing without contact info. The same number of contacts should reproduce IMO. The ordering may be different though. This brings up another consideration of mine that I've had: aren't contacts conceptually like joints. So if joints creation and destruction can be user managed, why not contacts too? With perhaps a component that automagically manages these - like is done now for contacts. |
Beta Was this translation helpful? Give feedback.
-
Yeah that's the deal; anything that allows the serialized world to diverge by an inch is a major issue for me, so I need to be sure it's a true copy. From my perspective it could be developed in either direction: that contacts are purely cached data that will always be automatically recreated the same way in the serialized world, or they contain unique and modifiable information that can always be read and recreated whenever. I think I'm just gonna do a test with the game right now and see what happens if I don't serialize them and if the state persists or not. |
Beta Was this translation helpful? Give feedback.
-
I just now converted this from being an "issue" to being a "discussion". |
Beta Was this translation helpful? Give feedback.
-
I'm not entirely against allowing users to manually create contacts. That said, related to discussion #544, I'm not sure giving the user an interface for creating what's otherwise automatically created and managed, is necessary for accurate deserialization either. If accurate deserialization is achievable without this, as I presently believe to be the case, then if nothing else, adding an interface for users to create contacts seems like it might do more harm than good in the sense of suggesting contacts had to be manually managed. |
Beta Was this translation helpful? Give feedback.
-
Desired Behavior:
To create a copy of the
World
state, I must be able to copy all the contacts of the previous world to the new one.Actual Behavior:
I am able to get all information about contacts, and I can construct them from the
Contact
constructor, but there is no way to manually add them tom_contactBuffer
andm_contacts
in the world state and get a new ContactID.There might be the same issue with manifolds (I haven't gotten to them yet), unless they are all created automatically when I create the contacts.
Beta Was this translation helpful? Give feedback.
All reactions