User Tools

Site Tools


4rpl:commands:rplcamtween

This is an old revision of the document!


Index

RPLCamTween

RPLCamTween(<-pos <-rot <-time)

Description

Causes the camera, in rpl mode, to move to pos and rotate to rot (both vector3s) over the specified time in seconds.

:WARNING: If you use this again while it's still active, it keeps track of any movements that are still running, so if you start a long one and then do a short one, after the short one finishes it will return to the long one if that still had time remaining and hadn't yet reached its destination. (I.e. if you start a eight second one, and then start a two second one two seconds in, at the four second mark it will return to where it would have been four seconds into the eight second one.)

One way to avoid this issue is to avoid overlap by calling interruptions too early and only interrupt things at the end of the movement, or at least close enough the duration doesn't last beyond the new movement.

Examples

RPLCamTween(V3(40 20 30) V3(40 0 0) 0.6)
GetCameraPosition ->cameraPos
GetCameraRotation ->cameraRot
 
SetRPLCam(true)
SetRPLCamPosition(<-cameraPos) #So the camera isn't sitting at 0,0,0.
SetRPLCamRotation(<-cameraRot) #So the camera isn't oriented as 0,0,0.
 
RPLCamTween(V3(40 20 30) V3(40 0 0) 1.5)

Index

4rpl/commands/rplcamtween.1719876765.txt.gz · Last modified: 2024/07/01 19:32 by durikkan