“Hard Attach” is a very useful thing in level design because it gives designers the ability to glue a bunch of movable objects together. For example, if you wanted to make a train out of a flat plane and four discs, you’d turn them all into InterpActors, animate the flat plane’s movement along a track, and hard-attach the four discs to the bottom of the plane by inserting the plane’s instance in F4 –> Attachments –> Base for each disc (don’t forget to also check Hard Attach). This means that wherever the plane goes, the discs will follow as if they were glued on.
Naturally I wondered: could you do the same thing with KActors? It turns out yes, but you have to use constraints instead. Follow these steps to get it done:
- Place the two actors you want glued together in the level.
- Open the Content Browser, go to the Actors tab, and search for “prism”. You should get a class called “RB_PrismaticSetup”; add that to the level roughly in between the two actors to be constrained.
- Open the Properties window for the constraint and insert the instances of the two actors you wish to attach. Also make sure all DOFs are limited (bLimited = true), making independent movement impossible.
- If you have more than 2 actors to attach, select one as the root and repeat for all other actors in the group.
And that’s it! It should be noted that a prismatic constraint is an “on-rails” constraint, meaning the object it acts up can only move in one dimension, with no rotation allowed. This is especially useful for a whole bunch of things by itself, with hard-attaching being just one application. Also note that you can easily do this same thing in UnrealScript by spawning an instance of RB_PrismaticSetup, but I like to do it in-editor so I can actually see the constraints.
I’ll leave it up to you to think of where this could be useful. I’m using it to join a big bunch of kickable blocks together, but you could also use it for some pretty awesome weapons or dynamic environments. So have fun with it!