I have a dump truck that is filled with simulated rocks. However, these rocks tend to fly out of the bed when I drive over a bump or hit a wall. To prevent this, I tried to create a single direction collision plane. This seems to be impossible, so I how could I constrain multiple simulated actors to a moving box?
Hey @jmancoder1 !
One thing you could do is add a CollisionBox that acts as a trigger on the entrances/exits that the truck has. And when an OnBeginOverlap happens between the rock and the box (you can cast the OtherActor to a rock to do so), it can check for a boolean on the rock if it can leave (so when you need it to get out of the truck), and if the boolean is false, make it bounce back into the truck
This can also be done by adding a box to the container in the truck and checking OnEndOverlap between the rock and the box.
Hi there,
If you create a box collision with custom collisionset as block only physics actors, that should work if the objects have collision profile set to physics actor.
Yes, but I also need to dump the rocks into the truck. The problem is, I need to allow the rocks to enter, but prevent them from leaving.
Got it.
To load/unload, you can try to get the box collision, then get a node “set collision response to channel”, set to physics actor and set to ignore.
To drive around, set collision response to that channel to block.
Depending on your geometrical needs, you want to create a static mesh cubic, split one face and turn it into a door. So, you have a hollow container with a door.