I now realize that my camera tools are not accounting for parent transformations. So I need to be able to use the following MOHO.MohoLayer function. But I have no example code using this, and this description isn't all that clear to me:
void GetFullTransform()
Gets the layer's complete transformation at a given frame, including the effects of its parent layers.
Return value: none
frame (int): frame number
matrix (LM_Matrix): transform matrix to fill in
doc (MohoDoc): the document object
I think it means this:
GetFullTransform( frame, matrix, doc )
but it would be nice to have some example code using this, or some document explaining this call. Especially one that shows how the 'matrix' is defined and used.
UPDATE:
I think I've figured out how to call GetFullTransform:
transform_matrix = LM.Matrix:new_local()
moho.layer:GetFullTransform(frame, transform_matrix, moho.document)
['transform_matrix' is setup to be the transform matrix]
And the matrix can be applied like so:
matrix:Transform( vector3d )
['vector3d' is changed to to reflect the transform being applied ]
The problem is I have yet to find what this transform is based on. What does it use as an origin for its coordinate system? I've tried these with no success:
- the layer's position at frame 0 = (lx,ly,lz) at frame 0
- the world origin = (0,0,0)
That is, I need the 3D vector 'origin' such that:
transform_matrix( origin ) = (lx, ly, lz ) = current layer position
Has anyone ever had to deal with this before? If not, I may have found a bug in MOHO, since the transform matrix I seem to get isn't based on anything logical (that I can think of)...
GetFullTransform
Moderators: Víctor Paredes, Belgarath, slowtiger
GetFullTransform
[==Peter==]
- patricia3d
- Posts: 726
- Joined: Thu May 31, 2007 4:38 am
- Location: India
- Contact:
hehe....kkrawal wrote:I think you are going to 3D. Just Great. I don't know Lua but I know python a little bit, they also use matrix for 3D.
I figured how to do this without the GetFullTransform() matrix... and I have improved all my camera tools accordingly (new versions can downloaded).
[==Peter==]
Actually, I've always thought the ability for thought to be able to translate to apparently un-physics driven motion (such as the ability to walk or move one's fingers as one decides, in deference to external environmental factors) as proof of free-will.rajlostmarble wrote:The theory of noetics centers around the idea that the human mind is capable of affecting or even doing work to the physical world.
___________________________
Ski Holidays|Ski Holiday
Though what this has to do with the topic I have NO idea... lol

[==Peter==]