Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from entities.entity import Entity
- from mathlib import Vector
- from players.dictionary import PlayerDictionary
- cameras = PlayerDictionary(factory=lambda index: None)
- def enable_camera(player):
- camera = cameras[player.index] = Entity.create('point_viewcontrol')
- camera.spawn_flags = 8
- camera.spawn()
- camera.angles = Vector(90, 0, 0) # Set your angle here
- camera.teleport(Vector(0, 0, 80), None, None) # Set your origin here (TODO: Might be possible to set angles here, too?)
- # camera.set_parent(..., -1) # You may also parent your camera to an entity pointer!
- camera.call_input('Enable', activator=player.index, caller=player.index)
- def disable_camera(player):
- camera = cameras.pop(player.index)
- camera.call_input('Disable')
- camera.remove()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement