Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Art on March 07, 2006, 12:02:52 PM
-
I have a question:
It seems to me, that after i prepare actor's walk animation and actor is walking on the scene, it take a little bit more delta, then it's set in walk animation sprite. May me some constant (about 2-3 pixels more) made by engine.
If so, can i turn off it, and make my actor move only on deltas i've put in the walk sprite animation?
-
The walking speed is automatically adjusted according to actor's current scale.
-
Then why walking looks different when i look it in sprite editor (it's good) and in engine (it's slips a little bit more, then in sprite editor)?
-
Because it's scaled in game?
-
I don't think so, i've set 100% scale to my scene - result is the same...
But it seems to me that except moving by deltas in sprite, engine adds some more delta to character's moving.
For example, if i make walking sprite with only one frame without moving delta - it's moved by engine anyway (see generic actor from tutorial). So does the shifting of actor done by engine only for _one frame sprite without moving_, or the same _additional_ shifting is performed by engine always?
-
Even more:
I've just created right walking sprite, which actually moves left.
SPRITE {
NAME="right"
LOOPING=TRUE
CONTINUOUS=FALSE
PRECISE=TRUE
FRAME {
DELAY = 25
MOVE {-10, 0}
KEYFRAME=FALSE
IMAGE = "actors\student\rr\right001.png"
HOTSPOT {110, 421}
EDITOR_SELECTED=TRUE
}
FRAME {
DELAY = 25
MOVE {-10, 0}
KEYFRAME=FALSE
IMAGE = "actors\student\rr\right001.png"
HOTSPOT {110, 421}
}
}
But when i try it in engine, it still canmove right.
So my opinion is that it should not :)
-
Well actually the algorithm is relatively complex, because the actor needs to follow the walking "line", which determines the walking direction. And how fast the actor moves along the line is determined by the "Move X/Y" setting from the walking animation. The move values are scaled according to current scale to adjust walking speed, the values are taken *absolute* and the actor always moves at least by one pixel (so that he doesn't get stuck in case there's no move set at all).
-
That's what i needed to know.
So as i see there is no way to turn this one-pixel-moving off?
-
No, but that "one-pixel-minimum" is really only used when there's no Move X/Y set in SpriteEdit so there's no point in removing this functionality.