And off we go…

Welcome to GnomeTank’s UDK Adventure. This is a “stream of consciousness” blog where I will post various tricks, tips, hacks and shenanigans related to me implementing an RPG game toolkit on top of the Unreal Development Kit. I will try to make daily posts covering my progress, things I’ve learned, ‘gotchas’ to avoid, and more.

We’ll start with a ‘gotcha’ I overcame last night. If you plan to implement a custom Pawn class (in my case, RpgToolkitPawn), you need to make sure you add the Mesh component to the Components in your DefaultProperties block, otherwise the pawn will have no visible representation.

For example

class RpgToolkitPawn extends Pawn
    placeable;

DefaultProperties
{
    begin object class=SkeletalMeshComponent name=Mesh0
        ... // setup your Skeletal mesh here
    end object
    Mesh = Mesh0 // Set the Engine.Pawn.Mesh reference to our Mesh0 component
    Components.Add(Mesh0)  /* THIS IS THE IMPORTANT PART. Without this, the pawn will not render your skeletal mesh */
}

As you can see, adding the ‘Components.Add(Mesh0)’ was extremely important to the Pawn being a visible entity in the game world.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: