Hey there,
I’ve got an issue with physics actors that interpenetrate instead of stacking on each other.
It happens sometimes, not each time, as seen in the gif below.
Actors are boxes with simple collisions and this setup :
And yes, the actor consists of a
single StaticMesh.
That was not my question. Is the static mesh the root of the actor or is it attached to the scene component that makes the root?
This one is critical when simulating physics actually and it’s easy to be caught off guard here. Simulating this can be unpredictable at times, for example:
Especially seeing that you attach and detach actors. Just making sure, nothing more.
There is no node existing for “detach component”. Also I attach a component instead of an actor cause I used the same scheme for different actors and some need to have just their root component attached and keep the actor location. But it doesn’t change anything to the issue (just checked). That’s right in this case attaching the actor would work the same.
Afaik, the root component’s transform IS the Actor’s transforms. But regardless, this setup should work. Is it happening with all meshes? Have you tried to reproduce the issue with editor’s default cube? Could you also try to test it without BP logic (just stack them above each other and simulate, so we can pinpoint if its BP problem).
Well this happens with default cube too (see pic). Also when removing the BP logic, the actors stack well. Perhaps is it due to a specific alignment from both actors ?
I tried with other meshes in my scene. It seems to happen too, but these are the only one to be so big and “stackable” : other meshes are tiny and less cubic (or there is only one), when dropping one over another they interpenetrate and just after the second one is “pushed” next to the first so they don’t stay one in the other.
I wasn’t able to reproduce that without VR part. If you can upload a minimal project with this problem (which can be played without VR) I will try it. As a work-around I can suggest you keeping your objects with simulate physics = true, and control them with physics handle component. It’ll be more similar to how HL:Alyx or BoneWorks approach their pickUp logic.
Unfortunately I don’t know how to make such a setup without the VR part. Using a “standard” pawn will not react the same imo. How do you mind the thing ?
Also using physics handle would make me modify all the movable meshes of my game - huge changes for a “minor” bug after all. And imo HL Alyx doesn’t use physics handle for taking objects in hand (but the distance grabbing probably do), does it ?