Game Development Community

Keeping Camera within tilemap

by Kevin Epps · in Torque Game Builder · 03/23/2007 (5:38 pm) · 2 replies

Is there a function that does this already, or do I have to implement it myself?

#1
03/23/2007 (10:22 pm)
@Kevin, if I understand the question correctly -- yes, you'd have to manage the max/min X/Y positions of the camera through code ...
#2
03/23/2007 (10:55 pm)
Ok, thanks.

So, would I achieve this buy using the setViewLimitOn(%minX, %minY, %maxX, %maxY) call or create a function to constantly check the camera position and then setCurrentCameraPosition to the edge of the tile map. I'll have the camera mounted as well, so is that going to make a difference?