09-09-2019, 11:50 AM
(09-09-2019, 11:41 AM)josemendez Wrote: Of course, that's what prefabs are meant to be used for. What GeneratePhysicRepresentationForMesh() does is re-create the entire particle-and-constraint representation of a mesh from scratch. This is very expensive and generally not supposed to be done at runtime unless you're generating entirely procedural actors.
A prefab already contains all this information in serialized form. So you simply instantiate it, assign it to a solver, and you're done. Excerpt from the manual:
http://obi.virtualmethodstudio.com/tutor...ctors.html
Great stuff, I was trying to do this with in-scene prototypes, but that was causing an issue where the physics wouldn't work. I will try this and report back