CatxFish / motion-effect

obs-studio plugin for source item animation
https://obsproject.com/forum/resources/motion-filter.668/
GNU General Public License v2.0
212 stars 38 forks source link

Toggle for relative movement (instead of absolute) #7

Open GrandyB opened 6 years ago

GrandyB commented 6 years ago

I want to be able to easily move a handful of components off screen with a single hotkey.

Source A is 1280x720 and is on the whole screen (x: 0, y: 0). Source B is some text, is quite small (200x50) and is in the middle of the screen (x: 640, y: 360).

Currently, if you begin trying to animate these to move at the same Linear rate, you have to figure out how big your scene is, then calculate how much further each element needs to travel in order for them to travel at the same speed. e.g. Source A might go to x:0/y:720, while Source B would have to be... x:640, y: 1080 It's a bit of simple mathematics for this example, but it can get rather awkward.

Then think of the Bezier curves - you'd have to change all of the points to be centred on x:640 and relative to your y value being either 0 or 360... can see how that might be awkward to have to change so many values.

Instead, have a toggle between absolute positioning and relative positioning, so that you can just copy values between filters for different sources, resulting in the same behaviour in both.

GrandyB commented 6 years ago

See #10 for some further thoughts on relative movement.