Shard Posted May 8, 2010 Share Posted May 8, 2010 So I am trying to parent the camera to my characters head for a first person view. Of course I go ahead and find the child head and create a mesh for it and all that. When I go to parent the camera to the head, the camera get tilted into one side. When I comment out the parenting, then its just fine. //Parenting and Not Working EntityParent(frameWerk->GetMain().GetCamera(),head); Not much more to it than that. I even tried getting the camera rotation before parenting and then setting it back to that rotation but that didn't work. //Recording, Parenting and Resetting TVec3 rot = EntityRotation(frameWerk->GetMain().GetCamera()); EntityParent(frameWerk->GetMain().GetCamera(),head); RotateEntity(frameWerk->GetMain().GetCamera(), rot); What should I do to fix this? 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...
Canardia Posted May 8, 2010 Share Posted May 8, 2010 Use SetEntityMatrix/GetEntityMatrix instead of parenting. Parenting has lots of problems where positioning always works fine. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Shard Posted May 9, 2010 Author Share Posted May 9, 2010 Use SetEntityMatrix/GetEntityMatrix instead of parenting. Parenting has lots of problems where positioning always works fine. No luck. Same effect. Even tried a manual get/set pos and get/set rotation. No luck. Also, see the related thread here: http://leadwerks.com/werkspace/index.php?/topic/1927-find-child-entity-matrix-all-messed-up-bug/ 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...
Josh Posted May 10, 2010 Share Posted May 10, 2010 It sounds like your animation make the bone oriented in a way you did not intend. If you can post a demo showing your problem, someone can probably help you. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Shard Posted May 10, 2010 Author Share Posted May 10, 2010 It sounds like your animation make the bone oriented in a way you did not intend. If you can post a demo showing your problem, someone can probably help you. This happens even before I start the animation. As for a demo, I'm going off of the Animation tutorial directly. 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...
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.