More texturing work. Custom pawn is working in UDK. Today I integrated the foot placement code from this page http://udn.epicgames.com/Three/Using...ntrollers.html. If you use that code make sure you remember to set TranslationZOffset in your default properties. This is how much the origin of your mesh is adjusted after import (so that the origin is in the center, not by the feet). It took me a while to figure this out. I added a line that resets the mesh translation to zero if neither foot touches anything. Strangely it messed with my camera some.
Code:
simulated event Vector GetPawnViewLocation()
{
local vector NewView;
Mesh.GetSocketWorldLocationAndRotation(EyeSocket, NewView);
viewLoc=NewView-Mesh.translation;
return viewLoc;
}
If you use true first person like me you need to tell it to adjust when the mesh offsets even though in theory you shouldn't need to... Took me a while to figure it out...





So basically the hilt docks into the left side of the chest. When drawn the blade materializes from the hilt like a T-1000 terminator. Its default form is a combat knife but you can equip different modifiers that can make it have a different form when drawn.
Bookmarks