ozRocker Posted February 19, 2018 Share Posted February 19, 2018 I have a person with rigged eyeballs. I can get the bone of the eyeball and move it around while the person is not animated. But when the person is walking I can no longer control the eyes. They just stay fixed in the same place. It feels like the eyes have motion set in the key data in the .babylon file. Does anyone know how to control a bone while an animation is running? Quote Link to comment Share on other sites More sharing options...
adam Posted February 19, 2018 Share Posted February 19, 2018 Rotate the eyeball before render. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted February 19, 2018 Author Share Posted February 19, 2018 1 hour ago, adam said: Rotate the eyeball before render. ok, I put it in scene.registerBeforeRender() but its the same as before. Eyeball only moves when the armature animation is not playing. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted February 19, 2018 Author Share Posted February 19, 2018 This is the .babylon data for the right eye {"name":"Eye.R","index":6,"matrix":[0.9884,0.0137,-0.1514,0,0.152,-0.0945,0.9838,0,-0.0008,-0.9954,-0.0955,0,0.1991,0.5541,0.6309,1],"rest":[0.9884,0.0137,-0.1514,0,0.152,-0.0945,0.9838,0,-0.0008,-0.9954,-0.0955,0,0.1991,0.5541,0.6309,1],"parentBoneIndex":5,"length":0.1678 ,"animation":{"dataType":3,"framePerSecond":30,"keys":[ {"frame":1,"values":[0.9884,0.0137,-0.1514,0,0.152,-0.0945,0.9838,0,-0.0008,-0.9954,-0.0955,0,0.1991,0.5541,0.6309,1]}, {"frame":37,"values":[0.9884,0.0137,-0.1514,0,0.152,-0.0945,0.9838,0,-0.0008,-0.9954,-0.0955,0,0.1991,0.5541,0.6309,1]}],"loopBehavior":1,"name":"anim","property":"_matrix"}}, Maybe there's something in there that is forcing a position on the eye while the animation is running. I've tried deleting the keys but then the eye disappears completely Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 19, 2018 Share Posted February 19, 2018 I had tried to do this some time ago and I had not succeeded too. In fact babylon can only play one animation at a time of what I understood. Otherwise it is necessary that the movement of the eyes is integrated in the animation of walk for example. If there are two separate animations, only one will play. This subject interests me a lot if a solution is found. Maybe something is missing at babylon to handle multiple simultaneous animations. JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted February 19, 2018 Author Share Posted February 19, 2018 I made a playground here where you can see the problem. If you comment out the beginAnimation command the eye will spin around https://playground.babylonjs.com/#BDG7ME#25 Quote Link to comment Share on other sites More sharing options...
adam Posted February 19, 2018 Share Posted February 19, 2018 https://playground.babylonjs.com/#BDG7ME#26 GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted February 19, 2018 Author Share Posted February 19, 2018 6 hours ago, adam said: https://playground.babylonjs.com/#BDG7ME#26 Nice! This works perfectly for my needs. Obviously not having an eye spinning around like a crazy person, but I can ease into the angles and it works fine. Thanks @adam 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.