Closed GoogleCodeExporter closed 9 years ago
Original comment by thomas.t...@googlemail.com
on 9 Oct 2012 at 11:20
This patch adds a lua frontend for apply channel transform. The patch also
fixes the problem that set bone to manual in lua will crash the Runtime demo.
The crash problem comes from
gkEntity* ent = static_cast<gkEntity*>(m_object);
gkSkeleton* skel = ent->getSkeleton();
should just be
gkSkeleton* skel = static_cast<gkSkeleton*>(m_object);
Since the m_object itself should be a skeleton instead of an entity
Apply bone channel transform
- Set the bone transform at default transform
skeleton:applyBoneChannelTransform("BoneName")
- Set the bone transform with specify location, orientation
skeleton:applyBoneChannelTransform("BoneName", loc-vec)
- Set the bone transform with specify location, rotation
skeleton:applyBoneChannelTransform("BoneName", loc-vec, rotation-vec)
- Set the bone transform with specify location, rotation, scale
skeleton:applyBoneChannelTransform("BoneName", loc-vec, rotation-vec, scale-vec)
- Set the bone transform with specify location, rotation, scale, weight
skeleton:applyBoneChannelTransform("BoneName", loc-vec, rotation-vec, scale-vec, weight-sca)
Press K to enable left shoulder as a manual controlled bone
Press J to disable left shoulder as a non manual control bone
Press I to put shoulder up when it is a manually controlled bone
Press M to put shoulder down when it is a manually controlled bone
I also attach an example blend that shows this by modifying the bone -
parenting sample.
Hope it helps.
Sincerely,
Danil
Original comment by KAI.TING...@gmail.com
on 20 Oct 2012 at 3:02
Attachments:
Danil, thx for this great patch and the cool test-case for the regression test.
Sry, it took me a bit to apply the patch!
http://code.google.com/p/gamekit/source/detail?r=1203
Original comment by thomas.t...@googlemail.com
on 25 Oct 2012 at 7:18
To Thomas,
Thanks for the commit.
Sincerely,
Danil
Original comment by KAI.TING...@gmail.com
on 26 Oct 2012 at 5:05
Original issue reported on code.google.com by
KAI.TING...@gmail.com
on 9 Oct 2012 at 11:05Attachments: