Code: Select all
local pBone1 = skel:Bone(mstr2.fParent)
local vec2 = LM.Vector2:new_local()
vec2:Set(mstr2.fPos)
pBone1.fMovedMatrix:Transform(vec2)
I could not get around this. It seems that copying the bone position to a variable in conjunction with transforming the variable from the parent bone was effecting the bones fPos.
I finally found an alternate way to "copy" the bone fPos to a variable:
Code: Select all
local pBone1 = skel:Bone(mstr2.fParent)
local vec2 = LM.Vector2:new_local()
vec2.x = mstr2.fPos.x
vec2.y = mstr2.fPos.y
pBone1.fMovedMatrix:Transform(vec2)
There are several scripts that are effected by this. The TransRotate and RotateTrans that Rasheed and I have been working on. I plan to update those so they work properly.
This is a major breakthrough for me. I'm very happy.
I hope this might help others doing lua scripting.
-vern