I am working on a module and have created two objects, one that creates and destroys flowitens, and another one that works like a path where flowitens move through.
The problem I am facing is when I connect my object that creates flowitems with a queue and them with my path object, the flowitem position is updated correctly! But when I remove my queue and connect the two objects directly, my flowitem starts to move in the middle of the object.
I found out that the problem happens when updateLocations is executed, because I set the initial position of the flowitem on the onReceive method of my path object, and when I comment the updateLocations code, it stays at the start position in both cases.
Any suggestion on what I could be doing wrong? Should I be implementing another method like getPickOffset or getPlaceOffset?
That's my updateLocations method content.
if (currentState == STATE_BUSY) { if (time() != lastTimeRecorded) { treenode item = holder->subnodes[1]; setloc(item, holder->find(">spatial/spatialsx")->value / crossingTime * (time() - getitemvar(item, 1)), yloc(item), zloc(item)); lastTimeRecorded = time(); } } return 0;
Thanks for the help!