I’m writing a Python Script to control a bucket conveyor where every bucket is independent.
After some testing I managed to detach the bucket from my path and attach it to the 3D world, but I cannot attach it back to my path and I don’t know what I’m doing wrong.
from vcScript import *
comp = getComponent()
app = getApplication()
sim = getSimulation()
toppath = comp.getBehaviour(“TopPath”)
sensor = comp.findBehaviour(“ComponentPathSensor”)
world_container = sim.World.getBehavioursByType(VC_CONTAINER)
bucket = comp.ChildComponents
while app.Simulation.IsRunning == True:
I did not wanted do use part.stopMovement() and path.Enabled because the ideal would be to use just one path and sometimes I need to stop just a bucket while the rest is moving and down the line I would have to stop many at a time.