Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Setting Frame Limits with the Camera


Recommended Posts

I've been at this for a few days now. I want to make it so that, when Sonic passes a certain point, the camera scrolls to a certain point behind him and Sonic can't go back to that area.

The best thing I can think of doing for this is starting from scratch with a new camera system, with simpler boundaries (the boss camera was too complex to tamper with just its boundaries). Here's a picture to clarify:

cameraproblem.png

I want to make the camera so, when Sonic passes over this orange line, the camera will smoothly scroll to the point of that purple line ([EDIT] I don't need the auto-scroll anymore), and Sonic won't be able to go back to anything behind that purple line. I read somewhere on these forums that I need linear interpolation to accomplish this, and I saw a formula for it, but I don't have any idea when I would use that. However, I'm pretty sure the formula involves the camera. Of course, I'm not very experienced with the camera yet; I know how to set the TargetX and TargetY, but so far that's it.

Can anyone help me to work with the camera so I'm able to accomplish this?

Link to comment
Share on other sites

Yeah, something like that. An example would be in Sonic 1, when Sonic is about to reach the goal sign in Green Hill Zone - Act 1. If you can see the sign on the screen, try going back to the left. You'll find that you can only go as far as the edge of the last ramp.

In fact, I guess I wouldn't really need to scroll the camera. That makes things easier. Ignore the automatic camera scroll that I originally wanted. What I'd want is when Sonic reaches a certain point in the frame, the camera, and Sonic, can only go back as far as a certain point behind Sonic -- just like how it works in Sonic 1.

Link to comment
Share on other sites

OMG, that really worked! Awesome! Once again, Appo, you've solved my camera issues. :) It also works at the end of the act once I've hit the sign, which is another issue I had. Thank you so much! +Rep

[EDIT] Oh, that's right; I recently gave you reps, so I can't do it again. Is it all right if I have someone give you a rep on my behalf?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...