05-10-2019, 10:17 AM
(This post was last modified: 05-10-2019, 11:34 AM by josemendez.)
(19-09-2019, 03:30 PM)TimLewis Wrote: Hi there!
I'm trying to extend the Oni Contacts data struct to include a further variable
I'm wondering if there's a way to populate this when the Contact data gets set?
I have a BitMask variable that is in ObiEmitter that denotes what FluidType the fluid counts as:
And another FluidType variable which denotes what fluid containers accept (ie. wine glasses accept wine fluid).
I'm hoping there's a way to do this, as I'm trying to parallelise, into jobs, the logic to sort the contacts into containers - so I don't have the option of grabbing the particle emitter from Obi Solver.
Thanks in advance for all your help.
Tim
Hi,
You should not modify the contact struct, as it the C++ size of things assumes a certain memory layout (hence the StructLayout attribute). Modifying it or changing its size will result in undefined behavior --> most likely an instant crash if you're lucky, or memory corruption.
There's currently no way to extend contacts with user-defined data.