On 29/08/2016 at 10:15, xxxxxxxx wrote:
This is my code (another code but same problem) :
import c4d
from c4d import *
from c4d.utils import GeRayCollider
from c4d.modules import mograph as mo
import math
#Welcome to the world of Python
def main() :
Obj = op[c4d.ID_USERDATA,1]
ObjPos= Obj.GetMg()
mg = gen.GetMg()
md = mo.GeGetMoData(op)
if md is None: return False
cnt = md.GetCount()
marr = md.GetArray(c4d.MODATA_MATRIX)
fall = md.GetFalloffs()
for i in reversed(xrange(0, cnt)) :
Ray=GeRayCollider()
Ray.Init(Obj)
Ray.Intersect(marr _.off,ObjPos.off,300000)
print Ray.GetIntersection(0)
md.SetArray(c4d.MODATA_MATRIX, marr, True)
return True
I understand the problem form me is to find the "object coordinates, this is not the abs and the rel coordinate, i need to understand the concept