Forum Discussion
Forklift activity slips when going in reverse.
I have been trying to develop a small interactive game about forklift safety where a user needs to control a forklift and take on a small number of challenges. Some are basic and some are a little more complex.
However I've had to stop as I've recently noticed on one challenge when a user is required to drive up to a bunch of boxes, lift those boxes and move around, there is a small slip with the boxes. When moving forward (right arrow key) the boxes move at the same speed (length) as the forklift. But if the user needs to reverse (left arrow key) the boxes seem to slips by what I am guessing is a single pixel each time.
This may not sound so bad, but I would normally have a collision detection box to make sure the user hasn't smashed into the boxes. So if the boxes slip once lifted, this can be an issue. As you can see in the image below the boxes have slipped back too far.
I've supplied a watered down version which as the core triggers. Moving the forklift, lowering and raising its forks, and being able to raise/move the boxes.
The motion path lengths are the same, and I can't see any errors in the triggers. I was thinking maybe the boxes are moving before the forklift does, but I can't see anything that may cause this.
I've tried reducing the boxes path length by 1, but then it slips in the opposite direction.
If you have any ideas please help me out. I don't want this glitch being in the final product.
2 Replies
- AaronBurgessAUCommunity Member
Good idea. I'll give that a go. Hopefully this resolves the slip for me as well. Cheers.
- Nathan_HilliardCommunity Member
The problem is probably rooted in a sub-pixel difference between the motion paths. Since the editor only displays whole numbers, we can't seem to force the values to be the exact same. A similar issue is sometimes seen when resizing or positioning slide objects.
Try this: Delete both the forward and reverse motion paths for the palette. Select the forklift group. Copy the group (CTRL-C). Select the Animation tab in the menu bar. Click once on the Animation Painter button (left side). Click on the palette. This should copy the exact animation path from the forklift and paste it into the palette.
Now, click on the individual paths and rename them in the Animation toolbar. Go to the trigger panel and reapply the new animation paths to the triggers that are now missing their animation path data.
Try publishing. When I deleted and then directly copied the paths between the objects, this fixed the path length mismatch between the slide objects.
Related Content
- 12 months ago
- 13 days ago