Camera API
Create cool camera effects!
Simple example of pinkcage motel animation from air camera point to door
Cinematic cool and disable controls
When you turning with a camera and creating cool position animation you don`t want allow player movement or shooting, a player is on a same spot on the ground but a camera is somewhere else because that rcore offers simple toggle command for disable controls and start cinematic look which will create borders at top and bottom in black colour for a movie experience
Creating camera
Creating camera is so easy... After we create our API of course. Camera has a name which need to be unique and position.
Camera object
Object that will return function createCamera is table that allows you call function on it that mean that all data and function are in camera object you dont need to use other function everything is there.
pointTo(position)
Point your camera to specific position, allowed parameter is vector3() as position
render()
Set your camera active and render it to player
changeCam(newCamId, duration)
Change camera to another with animation between position, you need to create new camera for this and first parameter is camera ID not whole object
changePosition(newPos, newPoint, newRot, duration)
Change camera with animation to a new position for this will rcore create automatically one new camera and make animation change of position to a new point and then your current camera will receive new data so you can continue using it. Last two parameters is option for newRot is default vector3(0,0,0) and for duration its 4000 its in milliseconds
destroy()
Remove camera and destroy it but its still not stop rendering
Stop rendering and remove everything
if you want stop rendering your cams you have to use specific function stopRendering which will render player game camera again and stop rendering yours camera - dont forget that stopRendering will not destroy your camera
Last updated
Was this helpful?