santarcade Posted January 11, 2016 Share Posted January 11, 2016 Hi guys,I am experiencing an issue in doing something that I thought to be pretty easy: I need the equivalent of lookAt for bones, since I plan to move the eyes of a rigged character via bones. So I created a test rig in blender and tried to workout the code to properly rotate the bones to lookAt a given target and… I failed. I attached a screenshot showing the blend file in Blender.Babylon file: https://www.dropbox.com/s/fu5fgl5zckqh5dh/testeyes.babylon?dl=1Blend file: https://www.dropbox.com/s/ybo93nll7na7zyj/testeye.blend?dl=1 Playground demo: http://www.babylonjs-playground.com/#18WJHH#2 The problem I’m having is that the eye sphere seems rotating using the bone location as pivot point and, in addition, it appears to drift instead of being fixed at its position.In any case I did not find the proper rotation quaternion to put into the bone matrix. I thought that if a bone is attached to a parent bone (in this case, the one for the head), keeping the x,y,z components of the localMatrix and varying the rotation quaternion, the position should be kept, isn't it? Is it possible the problem comes from the bone origin being at the center of the sphere? Any clues?Thank you all in advance. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 11, 2016 Share Posted January 11, 2016 I'm not good with Blender but seems like you can attach do it manually: - On every frame, capture the position of a bone - Move your object to the right position 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.