Cinematic camera tool

For Decorations and areal map layout tools.

Moderator: Plugin Moderators

User avatar
erksmit
Villager
Reactions:
Posts: 10
Joined: Fri Mar 02, 2018 12:39
Plugins: Show

Plugin Creator

Cinematic camera tool

#1

Post by erksmit »

epicThumbnail.jpg
epicThumbnail.jpg (20.98 KiB) Viewed 57 times
this plugin adds a button to your sidebar, when pressed the camera will slowly move to random points in your city until you disable it.
This plugin is also available on the plugin store.
cinematicam.plugin
(7.98 KiB) Downloaded 2 times
known bugs:
  • on activation the camera will sometimes be yeeted really far
update 1:
  • fix camera speed tied to framerate
  • fix camera rotation freaking out
update 2:
  • camera can now move in all possible directions instead of 8
  • camera no longer gets moved to the other side of the city on activation
  • camera can no longer get stuck around endpoint
  • button will now be hidden when hide ui is true
update 3:
  • user can now set a speed multiplier in the settings
update 4:
  • added manual mode where user can manually set waypoints to pan through
  • added speed multiplier to plugin settings
  • updated graphics a bit
  • made code use vectors
if you wanna see my bad code get it here
cinematicamScripts.zip
(4.43 KiB) Downloaded 2 times
Last edited by erksmit on Mon Feb 22, 2021 17:13, edited 8 times in total.

User avatar
CommanderABab
AB
Reactions:
Posts: 9246
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cinematic camera tool

#2

Post by CommanderABab »

It works fine as long as the map isn't rotated. :)
Screenshot_20201102-110025_TheoTown.jpg
Screenshot_20201102-110045_TheoTown.jpg
Screenshot_20201102-110055_TheoTown.jpg
These images do noy do justice to what is going on :)
Image

User avatar
erksmit
Villager
Reactions:
Posts: 10
Joined: Fri Mar 02, 2018 12:39
Plugins: Show

Plugin Creator

Re: Cinematic camera tool

#3

Post by erksmit »

the tool will run just fine on mobile but the camera speed is framerate dependend, since i made the plugin on pc the camera speed is adjusted for ~200 fps. Obviously phones have a way lower framerate and the camera will move ungodly slow there. Thankfully i think i found a fix to normalize for framerate so i should have a fix tomorrow

User avatar
CommanderABab
AB
Reactions:
Posts: 9246
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cinematic camera tool

#4

Post by CommanderABab »



https://youtu.be/KFqNf6ZefIA

Skip to 3:50 to see the problem.
Image

User avatar
erksmit
Villager
Reactions:
Posts: 10
Joined: Fri Mar 02, 2018 12:39
Plugins: Show

Plugin Creator

Re: Cinematic camera tool

#5

Post by erksmit »

yeah it doesnt like it when you rotate for some reason, in the update its gonna lock your rotation cuz i dont think ill be able to fix it.
also its supposed to look like this: https://youtu.be/N-WM5pDmQH8 (ignore ja's party house)

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2110
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cinematic camera tool

#6

Post by KINGTUT10101 »

This is a really cool plug-in. I've always wondered if something like this was possible, but I just didn't have the time to test it myself.
If I were to make one suggestion, I wish the icon would disappear in Hide UI mode.

User avatar
CommanderABab
AB
Reactions:
Posts: 9246
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cinematic camera tool

#7

Post by CommanderABab »

I don't know if you need to lock the rotation while it is on. It is really useful to randomly place things like trees or decorations. :)
Image

User avatar
erksmit
Villager
Reactions:
Posts: 10
Joined: Fri Mar 02, 2018 12:39
Plugins: Show

Plugin Creator

Re: Cinematic camera tool

#8

Post by erksmit »

the camera speed is now adjusted for your devices fps, which should give approximately the same camera speed on pc and mobile. Also rotating no longer breaks it as a side effect of some optimizations ive made

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2110
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cinematic camera tool

#9

Post by KINGTUT10101 »

erksmit wrote:
Mon Nov 02, 2020 20:18
the tool will run just fine on mobile but the camera speed is framerate dependend, since i made the plugin on pc the camera speed is adjusted for ~200 fps. Obviously phones have a way lower framerate and the camera will move ungodly slow there. Thankfully i think i found a fix to normalize for framerate so i should have a fix tomorrow
If you don't mind me asking, how did you fix this framerate issue?

User avatar
JustAnyone
Rip-off engineer
Reactions:
Posts: 3105
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Platform

Re: Cinematic camera tool

#10

Post by JustAnyone »

You'd add something like

Code: Select all    Reset

local lastMS = 0 local movementPerSecond = 42 local x = 0 function script:update() local ms = Runtime.getTime() local passedSeconds = (ms - lastMS) / 1000 if passedSeconds <= 1 then x = x + movementPerSecond * passedSeconds end lastMS = ms end
Interactive Lua editor
Run

User avatar
erksmit
Villager
Reactions:
Posts: 10
Joined: Fri Mar 02, 2018 12:39
Plugins: Show

Plugin Creator

Re: Cinematic camera tool

#11

Post by erksmit »

if you want to see the code ive put the file in the post

Post Reply Previous topicNext topic

Return to “Decorations and Tools”