Here's my crude attempt at a fly-by camera. (video, source example)
(if possible, watch with chrome @60fps to see how it really looks in game)
With it, you can do stuff like:
- Introduce a new area or a boss with a fly-by
- Show the player where to go
To create a "fly by", simply add points to your trajectory with the function below:
Code: Select all
mdCam.script:addPoint(x, y, facing)
x = the x position in the editor where you want the camera to go
y = the y position in the editor where you want the camera to go
facing = the way the camera needs to look when arriving at the point (0 = north, 1 = east, 2 = south, 3 = west)
Code: Select all
mdCam.script:startCam(duration)
duration = the number of second the total flight should take
- There is some smoothing, but it's very crude and/or or not done at all. The faster the camera goes the easier it's to notice.
- There is only support for elevation (because I didn't need it myself yet)
- You fly through the area but don't hear the sounds. That's because you hear the sounds where the party is instead of where the camera is.
Please feel free to use this, change it and/or completely rework it.
This is just a basic attempt from my side with all the stuff I needed.
Hope you can use it in your project. For full instructions read the readme file in the example, in the mod_assets/mdCam folder.