GetPosition object in new world
-
On 03/05/2014 at 04:25, xxxxxxxx wrote:
Hi! Sorry my bad English
I am looking for the location of the object, on the new coordinate system
import c4d
from c4d import gui, modules
from c4d.modules import snap
#Welcome to the world of Pythondef main() :
world = snap.GetWorkplaneObject(doc)
matrix = world.GetMg()
rotation = world.GetAbsRot()old_pos = op.GetAbsPos()
new_pos = old_pos-matrix.off
print new_pos
if __name__=='__main__':
main()old_pos-matrice.off works for all offset plans, but not rotated...
If I have an offsett rotated plane, how do I get my object's position in the new world coordinate?
thanks! -
On 03/05/2014 at 11:03, xxxxxxxx wrote:
GetAbsPath != absolute Position.
Please take a look at the Python C4D documentation. At the bottom of the c4d.Matrix reference page there is a chapter called "The Matrix has you". I hope this helps to clearify a few things.
Bye, s_rath
-
On 03/05/2014 at 11:21, xxxxxxxx wrote:
thanks s_rath... I had already read the c4d. matrix but I did not understand...
You can you explain better?