Flex collisions

Hi,

I am building a project with the LeapMotion and Flex.
I want to get collision information for Flex objects and particle systems.

Here are my questions:

  1. For a particle emitter, how do I get the OnParticleCollide event to trigger? I put a non-Flex cube next to my emitter and I see the particles hit it, but the event never fires.
  2. I have a Flex sphere with a Flex container. I can poke it with the LeapMotion fingers but I can never get the OnActorHit event to fire when I touch it. If I throw a regular cube at it, the event fires and I can get impact data.
  3. Someone @ nVidia said it is impossible to get hit events with Flex actors. https://github.com/NvPhysX/UnrealEngine/issues/148# Does that mean that I will never be able to get collision data for a Flex actor? As I said above, a regular cube and my Flex sphere collide and I get the event with the force data.
  4. I want to be able to manipulate a Flex sphere and get information about the manipulation (e.g., force of the contact, number of particles displaced). Is that possible/impossible? I want the events to be for the morphed object, not just for a static collision box/sphere.

Any help is appreciated!

Hi br1one

I also trying to find this out. But It seems we can use position to compute collision… There is no API for getting collision field but it has a method to get contact plane in NvFlex.h

I ended up modifying the UE4 Flex integration to use the NvFlexGetContacts function in the Flex API. I have something similar to what happens in FFlexContainerInstance::DebugDraw().

What’s important to understand is that the Flex engine is separate from the PhysX engine. If you want Flex callbacks in UE4, you might have to add them yourself.