User Tag List

Results 1 to 4 of 4

Thread: Some camera issues

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some camera issues

    Greetings! I'm looking for the perfect camera system for my game, and after quite some time spent thinking about it, I decided to ask for help!



    The camera I'm looking for will always be positioned so that the area under the player takes up about 1/4(or even less) of the screen, like in the sonic games.
    When the character jumps, the camera should not follow it up in Y-axis unless it passes a certain height.
    I tried to get around this by having the playing field divided into "zones", so that each zone had a certain y-offset that the camera object would align itself by, however this has proven less than optimal.
    I tried the Sonic Worlds engine which did a passable job at the camera system I'm looking for, but I couldn't figure out which lines of coded did what I was looking for.

    Any ideas on this?

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Think of having a minimum and maximum line following the camera, and the player triggering them:

    ---------------------------Min Y---------------------------



    ---------------------------Center Y---------------------------



    ---------------------------Max Y---------------------------

    If the player goes below Min Y, set the screen Y position to Player Y + Center Y - Min Y.
    If the player goes above Max Y, set the screen Y position to Player Y - max Y - Center Y.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I'm going to try it and see how it turns out!

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, now I know this is a big necro but the issue has come up again, and I realize I never solved it

    I implemented this solution, and it works fine when the player goes below min Y, but when he goes above Max Y the camera "snaps" down instead of increasing the Y value bit by bit. Does anyone have an idea why this might be happening?


    Edit: Sorry for necroing this, I think I solved it.
    The correct formula should be

    If the player goes below Min Y, set the screen Y position to Player Y + Center Y - Min Y.
    If the player goes above Max Y, set the screen Y position to Player Y - max Y + Center Y.

Similar Threads

  1. Camera zoom
    By ELCGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd November 2010, 12:19 AM
  2. IP Camera and Web Camera Extension for MMF2
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd June 2010, 05:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •