Parameter | Type | Description |
trans | dict | The inverse transform matrix of the camera |
mode | int | The projection mode of the camera - 1 for perspective and 0 for orthographic. |
N/A
Sets the camera projection mode and position for subsequent rendering. This can be used to manipulate the apparent position of static objects or for rendering UI elements separately to a 3D world.
import agan
class game():
def create(self):
# Default to world origin.
self.trans = agan.mktrans()
return self
#
def update(self):
agan.setcam(self.trans, 1)
# Move along +x
self.trans['pos'][0] = self.trans['pos'][0] + 0.1f
#
def close(self):
pass