Record Camera/Object Path Movement Script
Visit forum topic here: http://www.leadwerks.com/werkspace/topic/15171-record-cameraobject-path-movement-script
Features
- Record camera path movement by controlling camera itself, what you see is what you get
- Path information can be saved to sperated file for later use
- Attach saved path file to any entity to playback recorded path
- Camera movement can be adjusted for smooth and better path record
- Great for cut scene or object with motion.
Demo
What I did in this demo:
- Record the first path and save it to path1.lua
- Record the second path and save it to path2.lua
- Create a small box then attach each of saved path files
- Attach path1.lua to Pivot, attach path2.lua to box, watch their combination
How to use
- Download and extract 2 lua files to anywhere in your project folder, example: Scripts/Recorder
- Create a Pivot in your map then attach PlayerControl-PrototypeB.lua to it
- Create a lua file then choose it as" Record File" in Script tab of the pivot (This is required!)
- Run the game
- Press R to start/stop record
- Press P to playback recorded path
- Press Esc to exit
- Create an entity, ex: a box. Attach ObjectPathMovement.lua to it
- Choose saved record file (This is required!)
- Run the game
- Press J to start playback recorded path for the entity
Other attributes explaination
PlayerControl-PrototypeB.lua
- Playback Start: Execute playback process right after the game start, using data from choosen record fil
- Clean Screen: Hide all HUD elements while playback
- Both Playback Start and Clean Screen are good for cutscene camera
- Focus Object: Drag any entity which you want camera to point at while moving, this will ignore recorded rotation of camera.
ObjectPathMovement.lua
- Play Rotation: if this is false, entity will ignore recorded rotation
- 4
2 Comments
Recommended Comments