3D moving with constant speed between 2 points. Moves with a constant speed from (0, 0, 0) to TranslationEnd. They are called begin position and end position.
Start going to begin position, assuming that currently we're in end position (i.e. CompletelyEndPosion).
procedure GoEndPosition;
Start going to end position, assuming that currently we're in begin position (i.e. CompletelyBeginPosion).
procedure RevertGoEndPosition;
Stop going from end position to begin position and go back to end position. Call this only when currently EndPosition is False and we were in the middle of going to begin position.
As an example, this is what happens when door on DOOM level gets blocked. In the middle of closing (which ig going to begin position) it will realize that something blocks it, and open back (go back to end position).
procedure RevertGoBeginPosition;
Just like RevertGoEndPosition, but this should be used in the middle of the move from begin position to end position, to go back to begin position.
procedure GoOtherPosition;
This goes to the other position. Which means that if we're completely in end position or in the middle of move to end position, this goes back to begin position. And if we're in begin position, this goes back to end position.
procedure Update(const SecondsPassed: Single; var RemoveMe: TRemoveType); override;
Properties
property EndPosition: boolean read FEndPosition;
Is this object in end position, or going to it. If False, then this object is in begin position or going to it. See also CompletelyEndPosion and CompletelyBeginPosition.
Initially this is False, and EndPositionStateChangeTime is set such that we're sure that we're in CompletelyBeginPosion,
property EndPositionStateChangeTime: Single read FEndPositionStateChangeTime;
Otherwise (default) sound is initially made at initial 3D position of this object, and then the sound position doesn't change (even if the position of the object changes).