Shard Posted May 8, 2010 Share Posted May 8, 2010 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? Quote 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 More sharing options...
ZioRed Posted May 8, 2010 Share Posted May 8, 2010 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. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Masterxilo Posted May 8, 2010 Share Posted May 8, 2010 It should be called after in order to make it have an effect. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Recommended Posts
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.