UE3 - General How do you create on-the-fly skeletal animation?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

lanortha

New Member
Nov 9, 2010
1
0
0
Hello Everyone,

I'm using Unreal as a rendering engine for non-gaming purposes. I need to animate skeletal meshes on-the-fly, that is, the rotation and position of bones will be specified at run-time, by reading this information from a text file.

I see a lot of guides for creating animations inside the Unreal Editor, but for my purposes, I need to do this in code (the skeletal meshes are loaded dynamically as well).

Is there a way to access, and control the position and orientation of both the skeleton and the bones from code? (MyPawn extends UTPawn).

Roughly, this is how I'd like things to be setup:

boneList = names of bones in the current mesh, read from txt file
event Tick(int DeltaTime)
for each bone in boneList​
read position and rotation from file (using DLLBind)​
update bone position and rotation​

I believe I'll need to create an AnimTree when I spawn each pawn... (by calling some function "FormTree", which I will implement) but how I would create and populate an AnimTree with bones (specified in a file read at runtime) in UnrealScript (from scratch) I do not know.

Any suggestions or sample code?

Thanks.
Lesley.