《Solved》 Issue with physics integration (DirectX Cubism SDK)
Hello,
I'm working with the DirectX version of Cubism SDK. I have succeeded in loading the sample models into my application, drawing and setting values on the motion parameters. I'm now trying to integrate hair physics by loading the associated .json files.
I have used the Json class included in the SDK for parsing the file and further init a list of PhysicsHair objects. Everything seems to be initialized correctly. Every frame I'm calling the update() function on each PhysicsHair object from the list. The physics update is being called before Live2DModelD3D update.
The issue is the physics update does not change the target motion parameters at all. I tried also to set one of the target motion parameters to see if the physics will change it to another value.. and the value remains the same.
Is there anything wrong with my approach of physics integration?
0 ·
Comments
By design, the physics update does not directly change the target motion parameters. The physics is there to control a pre-set motion parameter (in your case, a hair parameter).
Use Live2D Viewer to simulate and see how physics will control the parameter to achieve the natural hair movement.
See this page to use physics with Live2D Viewer:
https://translate.google.com/translate?sl=ja&tl=en&js=y&prev=_t&hl=ja&ie=UTF-8&u=http://sites.cybernoids.jp/cubism2/live2dviewer/phisics/setting&edit-text=&act=url
Hope this helps!
Thanks for the answer. I have figured the problem, it was my fault, I found a bug on parsing and initializing the PhysicsHair objects. Now everything works as it should