Download

PhysX Joints for Destructibles - Bounding Volume seems incorrect - 4.4

I recently asked an answerhub question about some odd behavior I’m seeing when adding constraints to destructible objects. I also recorded a video to illustrate it.https://youtube.com/watch?v=xPsDakkYJpE

I’ve been debugging engine code trying to track down where this might be occurring. In my search I was looking through apex APIs and noticed that they have an NxDestructibleActorJoint

And a corresponding way to create these using NxModuleDestructible::createDestructibleActorJoint.

I went through the apex sdk samples, documentation and google searched but couldn’t find any sample code that uses this wrapper. The wrapper is kind of a pain to use compared to normal PhysX joint creation calls (you can’t pass a transform to the wrapper).

I’m not certain what this wrapper does differently in the joint creation other than perhaps handle the joint anchor pointer from getting ripped out underneath you, so I may be going too far down the wrong path.

Another thing I noticed is that destructible component collision bounds are not represented in the engine when I use ‘show collision’. This combined with the highly suspicious UDestructibleComponent::SetupFakeBodyInstance method are another place I’m looking.

I was hoping to get some experienced advice or hunches on what the actual issue might be and where I should be looking. I’m experienced with the PhysX SDK but am coming up to speed on UE4 source.

Re-reading my original post, I can see that things aren’t very clear. Let me try again.

I’ve found what looks like a bug in the apex destructible implementation.

There are specific APEX wrappers intended to create joints between APEX destructible objects and physX rigid bodies, UE4 is not using these wrappers.

When attaching joints to APEX destructibles, the joint attachment location on the destructible end is incorrect if that destructible has moved or has been chunked.

Hey Hyperdrive,

Can I first ask - is this happening when they are broken or is it happening when they are a still whole?

J

Wow, sorry I did not have email notifications enabled. This only happens once a destructible has been broken.