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

Messages - Intangible

#1
Nice! Your feedback was right on the money... as soon as I changed my code to modify the existing Game camera, it worked fine. I don't even need to touch the viewport now:

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

Thanks for the quick answers!
#2
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