Jump to content

Record Camera/Object Path Movement Script


tipforeveryone
 Share

Recommended Posts

Features

 

- Record camera path movement by controlling camera itself, what you see is what you get
wink.png

- 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 file

-
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

ObjectPathMovement.lua

PlayerControl-PrototypeB.lua

  • Upvote 9
Link to comment
Share on other sites

great!

 

thank's for sharing

 

just a small note (happens to me :

 

in:

function Script:Record_Mode_Toggle()

 

FileSystem:WriteFile retutn null if lua sandboxing is enabled

a check for a null and an advice would be nice

 

Juan

  • Upvote 1

Paren el mundo!, me quiero bajar.

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...