Blue Emerald Posted April 24, 2009 Report Share Posted April 24, 2009 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: 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 More sharing options...
Appo Posted April 24, 2009 Report Share Posted April 24, 2009 It might just be me being thick, but do u mean like in the firsst mario when you couldn't go back, but u want it to happen at a certain point? Link to comment Share on other sites More sharing options...
Blue Emerald Posted April 25, 2009 Author Report Share Posted April 25, 2009 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 More sharing options...
Appo Posted April 25, 2009 Report Share Posted April 25, 2009 ah i get u now, well i'll see if i can come up with anything for u EDIT: Hope this helps Link to comment Share on other sites More sharing options...
Blue Emerald Posted April 25, 2009 Author Report Share Posted April 25, 2009 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 More sharing options...
Appo Posted April 25, 2009 Report Share Posted April 25, 2009 lol, don't worry about it, just happy to help Link to comment Share on other sites More sharing options...
Recommended Posts