Jump to content

Animating A Child As Well As Turning It


Shard
 Share

Recommended Posts

Hey all,

 

So I have a model, whose "Bip 01" head I find as a child. I need to be able to turn this head independently so that the player looks left or right, up or down while still animating the rest of the body to be doing what ever is appropriate.

 

However, I've found that if I call any animation while still calling Turn Entity on the head at the same time, the Turn function doesn't work.

 

How would I structure my code or what code should I use so that I can turn the head individually while still being able to animate it?

If thats not possible, then can I turn the head and animate the rest of the mesh?

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

From the tutorial:

 

// ..before main loop
TEntity head=FindChild(mesh,"Bip01 Head");
...
// inside game loop
if (KeyDown(KEY_LEFT)) { TurnEntity(head,Vec3(0,0.5,0));}
if (KeyDown(KEY_RIGHT)) { TurnEntity(head,Vec3(0,-0.5,0));}
if (KeyDown(KEY_UP)) { TurnEntity(head,Vec3(0.5,0,0));}
if (KeyDown(KEY_DOWN)) { TurnEntity(head,Vec3(-0.5,0,0));}

 

Try to call TurnEntity before or after the Animate call.

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...