Parallax Behavior: keeping inside Camera View limits
by Kevin Epps · in Torque Game Builder · 03/11/2008 (7:30 pm) · 2 replies
Is there a way to edit this to stop a a parallax behavior once you reached a camera view limit?
I added values to set a camera view limit to the Mounting Behavior, so I'm wondering if that could be done as well?
I added values to set a camera view limit to the Mounting Behavior, so I'm wondering if that could be done as well?
About the author
Associate Phillip O'Shea
Violent Tulip
At the moment, there is no method of recalling the view limits on a camera, so, when you set the view limit, you're going to need to store those values somewhere. Next, when the parallax scroll rate is updated you will need to check if the min and max values of the camera lie outside of those values, if they are, set the scroll rate to zero.
Here is a quick and dirty script I just made up: