own = parent object which is a plane (ground)
empties are the children, they are parented and have a higher z axis than the plane
ground property IS on the parent, this hasn’t been forgotten
YET, the raycast is not returning ground_ray[0]
collision is triangle mesh on the plane but i dont think that matters.
there Is a material with physics enabled on the plane but i dont think that should matter either
for object in own.children:
start = object.worldPosition
end = object.worldPosition + Vector([0,0,-400])
ground_ray = object.rayCast(end,start,0,'ground',0,1,0)
render.drawLine(start,end,[244,120,0])
if ground_ray[0]:
print('ground ray positive')
object.worldPosition = ground_ray[1] + Vector([0,0,1])
logic.getSceneList()[0].addObject('Grassfluffy',object,0)