Page 1 of 1

Cinematic camera tool

Posted: 02 Nov 2020, 15:42
by erksmit
THIS PLUGIN HAS BEEN REMOVED FROM THE PLUGIN STORE BECAUSE IT DOES NOT WORK
this plugin is currently in a broken state and i am unable to resolve this anytime soon, ive only left this post up for archival reasons.


betterThumb.png
betterThumb.png (304.8 KiB) Viewed 3693 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
(8.14 KiB) Downloaded 231 times

known bugs:
  • on activation the camera will sometimes be yeeted really far (still cant find out why lol)
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
update 5:
  • support smooth zoom
update 6:
  • optimize camera speed calculation
  • add option to show tutorial dialog again
  • fix several bugs related to manual mode
  • improve destination generation in random mode
if you wanna see my bad code get it here
scripts.zip
(4.59 KiB) Downloaded 115 times

Re: Cinematic camera tool

Posted: 02 Nov 2020, 19:06
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 :)

Re: Cinematic camera tool

Posted: 02 Nov 2020, 20:18
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

Re: Cinematic camera tool

Posted: 02 Nov 2020, 22:06
by CommanderABab


https://youtu.be/KFqNf6ZefIA

Skip to 3:50 to see the problem.

Re: Cinematic camera tool

Posted: 02 Nov 2020, 22:20
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)

Re: Cinematic camera tool

Posted: 03 Nov 2020, 01:03
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.

Re: Cinematic camera tool

Posted: 03 Nov 2020, 01:06
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. :)

Re: Cinematic camera tool

Posted: 03 Nov 2020, 13:05
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

Re: Cinematic camera tool

Posted: 03 Jan 2021, 06:45
by KINGTUT10101
erksmit wrote:
02 Nov 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?

Re: Cinematic camera tool

Posted: 03 Jan 2021, 15:11
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

Re: Cinematic camera tool

Posted: 03 Jan 2021, 20:27
by erksmit
if you want to see the code ive put the file in the post

Re: Cinematic camera tool

Posted: 17 Mar 2021, 02:39
by KINGTUT10101
How do you switch the camera mode after you've selected one? After I start the random one it won't open the menu again.

Re: Cinematic camera tool

Posted: 17 Mar 2021, 10:11
by erksmit
You can change it in settings > plugins
and yeah those tutorial popups only show up once, maybe i should add a settings to show them again