Question abut the movement origin

I use this code to manipulate MovementOrigin

var1=1000
var2=400
move=mat.new()
move=part.MovementOrigin
move.rotateAbsX(90)
move.translateAbs(0,(var1-var2),var2)<

When I do that translate operation the PathSensor in my OneWay path does not notice parts entering on it.

1 Like

So here is my problem. I think it does not update the geometry so the path sensor would find the leading edge or trailing edge. It seems that the movement origin is still as the cylinder was standing. i’ve tried render, rebuild and update comands but no help.

Here is my code.

image

I thought that maybe because I do all at once it affects so I tried to do rotating and moving separetly. But it didn’t help either.

PLZ! Help!

Thanks!!
-Unnahi

Have you tested it both in ComponentPathSensor and RayCast modes?
RayCast is super heavy, but I would imagine that in this mode the movement origin does not matter.

You could also cheat the movement origin to be ok by translating the cylinder back by -400 mm so that the trigger is at the correct spot.

Hi @Este! No I didn’t try with raycast, because I would need 12 of them in total so it would bee to heavy. Instead I created my own cylinder geometry which is allready at on it’s side. So I don’t have to rotate. This way I got it working. Thanks anyway!