Hard-Attaching KActors

“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:

  1. Place the two actors you want glued together in the level.
  2. 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.
  3. 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.
  4. 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!


4 thoughts on “Hard-Attaching KActors

  1. I tried what you said to do for “more than 2 actors” but my objects wiggle and then fly off the map, without me even touching it. I’ve tried all sorts of combinations, but the wiggle does not go away. Any ideas?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s