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 17:08] – Grammar, syntax and spelling Karsten754rpl: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: If you are using multiple instances of this API in succession, be aware that when the elapsed time completes for any use of this APIthe camera will switch to it. In other words, if you run this API for one case that takes 6 seconds, and then run another that takes 4 seconds less than 2 seconds after the first use, the camera will transition to the second use of the API. Howeveronce the time has expired for the first use, the camera will switch back to the first instance of the 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 inat the four second mark it will return to where it would have been four seconds into the eight second movement.)
  
-One way to avoid this issue is to ensure that each call to this API takes at least 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 17: 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.1719868124.txt.gz · Last modified: 2024/07/01 17:08 by Karsten75