I’m seeing some weird collision issues in UE4.2.1 when using more than one collider component in a blueprint. A quick summary of what I’m seeing/repro steps:
- I derive a blueprint class “Test” from Actor.
- I add a Box shape component as the root of “Test”, with collision set to BlockAll + simulating physics + gravity enabled. At this stage, I can place the object in the world and watch it fall and collide with the ground plane as expected.
- I add a second Sphere shape component parented to the root of “Test”, with collision enabled (but not simulating physics) and set to BlockAll. I’ve moved this sphere so it’s not colliding with the root Box shape component. At this point, I can place the object in the world and watch the box collision collide with the ground plane as expected, but the sphere collision is completely ignored by the physics/collision system.
The final setup looks like:
- Now I move the sphere shape so it overlaps with the box shape slightly. When I place the object in the world and simulate, I see the whole object move upwards instead of falling with gravity, presumably because the sphere is internally colliding with the box each frame.
This setup looks like:
So I have three questions:
a) Why is the sphere collision not working in the first situation? If what I’m doing is fundamentally wrong, is there some documentation or C++ comments about this somewhere? I couldn’t find anything in my hunt. If we can only have colliders on the root components, this is a pretty crazy limitation of Unreal Engine’s collision system. Unity let us create all manner of compound colliders using primitives, and kept the total mass associated with the rigid body and not the individual colliders, which made more sense to me.
b) In the second situation, why is the object moving upwards? As mentioned I assumed it’s because of inter-collision between the two components, but why are they colliding if the sphere doesn’t collide with the world?
c) Will 4.3 fix all these problems? I saw there’s some compound collision features coming, however they looked to be limited to the static mesh editor. What about us plebs who want to use a skeletal mesh for the visual side of things and use compound collision primitives for the physics?
Thanks!