Animating Box Volume

Just to make sure - did you read the comment directly under the image for the Spawn Mover custom event? :smiley:

This is just a custom event that is responsible for creating new “invisible marching boxes” and then adding them into an array. Later, we tell every box listed in that array to move along the belt. It’s sorta like an escalator that moves sideways. (Actually, this system would be perfect for in-game escalators… just move at a diagonal vector!)

This is getting the relative transform (location, rotation, and scale) of the Start box, which is at the beginning of the conveyor (left side of the image showing the components). Using the relative transform of that box as the spawn transform for each of the invisible marching boxes means we can just take that start box, position it, and then scale it to the thickness we want all the marching boxes to be. Then, when they’re spawned, they have the same position and size as that start box.

Think of it as a cheat (no such thing, btw) - by doing this, we don’t have to explicitly tell each of these boxes we’re spawning what their position and scales have to be.

No. Your cardboard boxes are your own thing.

What this is doing is creating a stream of those “invisible marching boxes” I mentioned above. Think of them like the panels of a moving walkway like at the airport. They pop in, move to the end of the conveyor, and are destroyed. The cool part is that you can’t see them, but you can stand on them. They slide along and they carry your character with them. Or your cardboard boxes, if you like.

The nice thing about this is that your cardboard boxes can just be static meshes with physics applied to them (check Simulate Physics, but make sure your boxes have a collision surface. Open them in the Static Mesh Editor and choose Collision > 6DOP if they don’t). They can just fall onto the conveyor and they’ll automatically move. When they get to the end, they’ll fall off. Same with your character. She can stand on the conveyor and move with it, or run either with or against it.

This is just adding each of the “invisible marching boxes” to an array the moment it’s created. This is useful because it means that later, we can use a For Each Loop, which is designed to perform some operation on everything stored in an array. In this case, we use it to make all of our invisible boxes start marching down the X-Axis. We also check to see if they’ve reached the End box yet, and if they have, we destroy them.

Yep. That’s a bug. A really, really, REALLY, REALLY annoying one. And according to some of the engineers I’ve spoken with, it’s not a trivial thing to fix because of how we generate the name tables under the hood that drive what’s going on with references to your assets. The only way to work around it is to delete the node altogether and then close and reopen the editor, then recreate it. We’re aware of it and it is on the table to be fixed. It’s just one of those things that - while annoying - isn’t exactly breaking anything. It will be fixed, though.

Hope this helps!