This might be a bit of a beginner question, but I'm stuck on this for a while now and I have no idea why it is happening. I have a hunch because it is updating too slow, but I wouldn't know how to fix it.
I'm making a scene where you can drag a number of objects left and right at the same time. When they reach the edge of a certain area, they move to the opposite side of this area.
The problem I am having is with the items reappearing at the new position. They seem to do so fine when I drag slow, but when I start dragging fast, items start to spawn on top of each other and all end up on the same position if I just shake my mouse left and right for a few times.
The scene setup is an empty object which I drag left and right, this item has 6 items (as children of the first empty object) which, when reaching a certain world position, will change.
I am currently running a dragging FSM which moves the empty parent object.
(On touch, I am comparing the difference between the start and current position and applying that to the items position to drag it left or right. This seems to be working fine.)
Then in each of the children I am running seperate FSMs (so 6 in total), I am getting their position and checking to see if it is under or over a certain value and if it is, setting their position to the other side.
This works as such:
state 1:
Float Compare -> if X < 10 goto state 2
Float Compare - > if X > -10 goto state 3
state 2/3:
Set Position
Next Frame Event -> goto state 1 (this next frame event is here because I keep getting too many loops if I don't use this)
Thanks in advance for looking at this problem with me. If you need any more details, I can post them up. Just let me know.