Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Intangible

#1
I have an AGS game that runs 800x600 resolution. At one point in a cutscene, I wanted to have the game's camera zoom in on a character who's talking. So, I did this:

Code: ags
    // Create the camera/viewport
    Camera* sceneCamera = Camera.Create();
    sceneCamera.SetSize(400, 300); // half the normal resolution = 2x zoom
    sceneCamera.AutoTracking = false;
    
    Viewport* sceneViewport = Viewport.Create();
    sceneViewport.Camera = sceneCamera;
    sceneCamera.SetAt(401, 326); // specific position of zoom on original screen
    
    // Do some stuff while zoomed in
    Wait(10);
    cTom.Say("Test dialog!");
    
    // Restore to original zoom
    sceneViewport.Delete();
    sceneCamera.Delete();

When the scene zooms in, the overall graphics behave as expected, but Tom's speech text doesn't appear above his character: instead, it appears at the location where Tom was originally shown on the screen, before the zoom-in. It seems that the character text doesn't adjust its position for the zoomed-in viewport.

Has anyone else seen this? Am I using cameras/viewports wrong?

Thanks in advance!
SMF spam blocked by CleanTalk