ParaToxic Posted September 8, 2013 Share Posted September 8, 2013 Hey guys I have a problem in my gamecode but I don't even know why.I placed a pivot ( a cube) to the head of a character and fixed it with entityparent.Now I position in the Update function the camera to this cube pivot with positionentity which works perfect but the rotateentity function don't work.When I try to give the camera the same rotation as the pivot it doesn't rotate... For tests I also fixed the camera to the pivot with entityparent which works fine but without the camera doesn't roate... I don't know why maybe somebody can help me RotateEntity(IEngineSystem::Inst()->GetCamera(),EntityRotation(this->m_headpivot)); Thanks Quote Link to comment Share on other sites More sharing options...
cassius Posted September 8, 2013 Share Posted September 8, 2013 I found that parenting caused problems, and got rid of it.Can you just position the cube to the character position in the main loop? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Daimour Posted September 8, 2013 Share Posted September 8, 2013 Check the second parameter in these functions. You need to get and set global rotation, not local. Quote Link to comment Share on other sites More sharing options...
ParaToxic Posted September 9, 2013 Author Share Posted September 9, 2013 Look the idea is to set a pivot to the head of the character with entityparent which moves and rotates with the head animation while idle/walk.... but I want to adjust the percentage of rotation the camera moves so I position the camera to the pivots position and rotate each axis but multiply it with my percentage value. That is because some animations are very strong in the X or Y axis so I want to adjust it. I could skip the pivot and take the rotation of the head bone itself but it gives me very bad values, with global parameter 1 or 0 it makes no difference.... Quote 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.