Cinematic camera tool

For Decorations and areal map layout tools.

Moderator: Plugin Moderators

User avatar
erksmit
Villager
Reactions:
Posts: 23
Joined: 02 Mar 2018, 12:39
Plugins: Showcase Store
Version: Beta

Plugin Creator

Cinematic camera tool

#1

Post 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 3312 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 206 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 102 times
Last edited by erksmit on 18 Sep 2022, 17:50, edited 11 times in total.

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

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 :)

User avatar
erksmit
Villager
Reactions:
Posts: 23
Joined: 02 Mar 2018, 12:39
Plugins: Showcase Store
Version: Beta

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: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cinematic camera tool

#4

Post by CommanderABab »



https://youtu.be/KFqNf6ZefIA

Skip to 3:50 to see the problem.

User avatar
erksmit
Villager
Reactions:
Posts: 23
Joined: 02 Mar 2018, 12:39
Plugins: Showcase Store
Version: Beta

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: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

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: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

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. :)

User avatar
erksmit
Villager
Reactions:
Posts: 23
Joined: 02 Mar 2018, 12:39
Plugins: Showcase Store
Version: Beta

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: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Cinematic camera tool

#9

Post 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?

User avatar
JustAnyone
Developer
Reactions:
Posts: 3474
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

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: 23
Joined: 02 Mar 2018, 12:39
Plugins: Showcase Store
Version: Beta

Plugin Creator

Re: Cinematic camera tool

#11

Post by erksmit »

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

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Cinematic camera tool

#12

Post 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.

User avatar
erksmit
Villager
Reactions:
Posts: 23
Joined: 02 Mar 2018, 12:39
Plugins: Showcase Store
Version: Beta

Plugin Creator

Re: Cinematic camera tool

#13

Post 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

Post Reply Previous topicNext topic

Return to “Decorations and Tools”