LDCad Scripting: cannot get group position/orientation


LDCad Scripting: cannot get group position/orientation
#1
Question 
Hello everybody,

I have built a LEGO model comprising of submodels, groups and some scripting functions.
The problem is my local script in LDCad cannot determine the position or orientation of a (toplevel) group.
Calling group:getPosOri() always returns the identity matrix (0 0 0 1 0 0 0 1 0 0 0 1).

these are the relevant lines:
Code:
local mainsf = ldc.subfile()
local mygroup = mainsf:getGroup('MyGroup')
local posori = mygroup:getPosOri()  --> identity matrix, whereas the editor window in LDCad shows clearly different values

If required I can also provide a small working example.

Can someone please explain what is going wrong here...  Huh

using LDCad 1.6 Beta 2a

Edit: model and script added


Attached Files
.mpd   GroupTest.mpd (Size: 608 bytes / Downloads: 1)
.txt   GroupTest.lua.txt (Size: 721 bytes / Downloads: 1)
Reply
« Next Oldest | Next Newest »



Messages In This Thread
LDCad Scripting: cannot get group position/orientation - by Greg Montgomery - 2017-03-20, 3:10

Forum Jump:


Users browsing this thread: 1 Guest(s)
Forum Jump:


Users browsing this thread: 1 Guest(s)