Wintermute Engine Forum
Wintermute Engine => Bug reports => Not a bug => Topic started by: Azrael on October 20, 2009, 09:09:25 AM
-
In a game with a resolution of 1024x768 we have a scene in 1024x850.
Entering from another location the actor is placed vertically at the middle of the scene so, when the actor enter in the scene, the scene scroll up a bit.
With another position for the actor at the top of the scene it do the same.
I have tried "Scene.SkypTo(X, Y);" and also "Scene.SkypTo(actor);" but the scene always scroll down to the actor's position.
In horizontal scrolling scene i have no problem, it works perfectly. But in this scene it doesn't seem to want to work :-\
-
um, should be Scene.SkipTo no SkypTo
-
Sorry, it's Skip not Skyp yes :P . But in the scripts it is write in the right way ;)
-
Try this before Scene.Skipto:
Game.MainObject(null);
Because if the Main Object is the actor, the game always scrolls to the x,y of main object.
-
No, it didn't work.
Changing the main object to null works for Scene.ScrollTo but not for SkipTo.
Scene.SkipTo still works perfectly in horizontal scrolling scene, but not with this vertical scrolling.
But i found the problem. The coordinates where wrong.
In a horizontal scrolling scene i set the same coordinates of the main actor and it works. In vertical scrolling i have to found the coordinates manually :(
For example if the actor is skipped to 490, 516 i have to write 490, 410 for the Scene.SkipTo method.
-
There's one thing to remember, the SkipTo / ScrollTo methods try to focus onto the middle point of the actor. Perhaps that's the disproportion you need to add, half the height of the actor? Just a guess.
-
It seem to be the height of the actor, anyway solved.
Sorry for the error in reporting this, it's not a bug :P