LDCad Scripting: cannot get group position/orientation
		
		
 
		2017-03-20, 3:10 
(This post was last modified: 2017-03-20, 10:35 by Greg Montgomery.)
		
	
	
		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:
If required I can also provide a small working example.
Can someone please explain what is going wrong here...
 
using LDCad 1.6 Beta 2a
Edit: model and script added
	
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 valuesIf required I can also provide a small working example.
Can someone please explain what is going wrong here...
 using LDCad 1.6 Beta 2a
Edit: model and script added
      
      
 
			
  Sorry about that.