User Tools

Site Tools


4rpl:commands:rplcamtween

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:rplcamtween [2024/07/01 15:44] – [Description] Bug note - edit Vertu4rpl:commands:rplcamtween [2024/07/04 02:01] (current) – [Examples] Improved advanced example Vertu
Line 8: Line 8:
 Causes the camera, in rpl mode, to move to pos and rotate to rot (both vector3s) over the specified time in seconds. Causes the camera, in rpl mode, to move to pos and rotate to rot (both vector3s) over the specified time in seconds.
  
-:WARNING: Should you be using multiple of these API in succession: be weary that when the elapsed time completes for any use of this API, it will have the camera switch to it. In other words, if you run this API for one case that takes 6 seconds but then run another that takes 4 seconds less than 2 seconds after the first use of the API, the camera will transition to the 2nd use of the API but once the time would of expired for the first use of the API, the camera will proceed to snap into the placement of the 1st use of this API.\\ +:WARNING: If you use this again while it's still active, it keeps track of any movements that are still runningso if you start a long movement and then do a short movement, after the short movement finishes it will return to the long movement if that still had time remaining and hadn't yet reached its destination. (I.e. if you start a eight second movementand then start a two second movement two seconds in, at the four second mark it will return to where it would have been four seconds into the eight second movement.
-way to avoid this issue is to have every call of this API take at least just as long as the previous call.+ 
 +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 ===== ===== Examples =====
Line 16: Line 17:
 </code> </code>
 <code 4rpl> <code 4rpl>
-GetCameraPosition ->cameraPos +RPLCamCopyPosAndRot #So when RPLCam is activated, we say the current camera is how the RPL cam should start as.
-GetCameraRotation ->cameraRot +
 SetRPLCam(true) SetRPLCam(true)
-SetRPLCamPosition(<-cameraPos) #So the camera isn't sitting at 0,0,0. +RPLCamTween(V3(40 20 30) V3(40 0 0) 1.5) #Have the RPLCam move to this position and rotate to this rotation.
-SetRPLCamRotation(<-cameraRot) #So the camera isn't oriented as 0,0,0. +
- +
-RPLCamTween(V3(40 20 30) V3(40 0 0) 1.5)+
 </code> </code>
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
4rpl/commands/rplcamtween.1719863086.txt.gz · Last modified: 2024/07/01 15:44 by Vertu