Post

Working on an event system and I'm currently stuck on levers, basically it requires you to move your mouse to use it but when activated it instantly gives controls back leading to a jerking motion, if you guys know games that have this style of lever let me know the name! #godot #gamedev #concept

2 reposts10 likes

Oh yeah the Amnesia (and older Penumbra) series do this pretty well! I think from memory there's a kind of input dampener right after you release a lever. So camera mouse movements start scaled to almost zero but ramp back to full speed in like 200ms to smooth it out

Huh interesting, I was thinking a timer but didn't really think about smoothly returning it over time I reworked it to not automatically return controls until the user lets go manually but I might experiment with the dampener idea

easings.net While I remember it, here's a helpful cheat sheet on curves/easing functions! Includes the maths function behind each one - just imagine x = time, y = input multiplier from 0-1 Can be reused for all kinds of visuals and timing transitions