HunterPT
(HunterPT)
April 9, 2016, 12:31pm
202
Forgot to mention another problem that anyone that intends to use this needs to fix at some point, which is the particles not being deleted, this eventually leads to the editor crashing, haven’t bothered to fix it so can’t present code, but shouldn’t be too hard.
Thanks for the link, I haven’t seen that one before. He is basically doing the same thing as we are doing with using BodyInstance but he does it directly from Physx scene. You can do it directly with physx and it’ll remove some overhead from the process. FBodyInstance is really a wrapper that does those same things under hood to get data from physx scene to unreals world.
I’ve used physx directly on my own prototypes as well but using BodyInstance for reading the values is easier as you don’t need to include physx stuff on your build settings and includes + it takes care of some safety aspects like thread locking and getting the values correctly.
That being said, if you don’t use BodyInstance directly and try to use Unreal’s regular getters for world space location for actors and components, their rotations etc, they only get updated right before each tick and that’s probably the thing he was trying to avoid.
Thanks for the reply, I now see when to use Physx directly.