parententity + positionentity O_o

Blitz3D Forums/Blitz3D Beginners Area/parententity + positionentity O_o

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The problem is, that the first cube flips the direction, then a second cube flips it again and so on, resulting in the cubes to go back and forth.
The easiest solution is to replace the line
"If mov1\x > 3.0 Or etc"
with this:
If mov1\x > 3.9 Then direction = -0.01
If mov1\x < -3.9 Then direction = 0.01

Another approach, with a different result, is to make "direction" a field of the "mov" type. That way, each cube has it's own direction.