Wintermute Engine Forum

Wintermute Engine => Bug reports => Not a bug => Topic started by: Azrael on October 20, 2009, 09:09:25 AM

Title: Scene.SkipTo() not working on vertical scrolling scene
Post 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  :-\
Title: Re: Scene.SkipTo() not working on vertical scrolling scene
Post by: metamorphium on October 20, 2009, 06:32:01 PM
um, should be Scene.SkipTo no SkypTo
Title: Re: Scene.SkipTo() not working on vertical scrolling scene
Post by: Azrael on October 20, 2009, 08:15:14 PM
Sorry, it's Skip not Skyp yes :P . But in the scripts it is write in the right way ;)
Title: Re: Scene.SkipTo() not working on vertical scrolling scene
Post by: lacosaweb on January 19, 2010, 11:17:02 AM
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.
Title: Re: Scene.SkipTo() not working on vertical scrolling scene
Post by: Azrael on January 19, 2010, 01:12:56 PM
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.
Title: Re: Scene.SkipTo() not working on vertical scrolling scene
Post by: Mnemonic on January 19, 2010, 01:17:56 PM
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.
Title: Re: Scene.SkipTo() not working on vertical scrolling scene
Post by: Azrael on January 19, 2010, 05:43:33 PM
It seem to be the height of the actor, anyway solved.
Sorry for the error in reporting this, it's not a bug :P