4 ms·
Presumably it can't just be a spring obeying Hooke's law F=kx, or else the camera would "bounce" back and forth, right?
by pcwalton 5y ago
Presumably it can't just be a spring obeying Hooke's law F=kx, or else the camera would "bounce" back and forth, right?
- dcow 5y agoI mean that really depends on `k`.
- nitrogen 5y agoIf there's no way to remove energy from the spring then it will oscillate indefinitely. So there has to be a damping factor somewhere.
- monocasa 5y agoYes, springs in game physics engines typically have damping factors and other variables than just what's need to Hooke's law. For instance, Unity's Spring Joint: https://docs.unity3d.com/Manual/class-SpringJoint.html https://docs.unity3d.com/Manual/class-SpringJoint.html That being said if you don't model inertia of the spring (or at least what it's connected to, in this case the camera itself), would you have any oscillations? I thought inertia was a separate concept from Hooke's law, but it's been a while since I've touched high school style classical physics.
- pcwalton 5y agoWell, Hooke's law describes force, which isn't really a meaningful concept without inertia. I suspect that the game isn't really using springs at all, and instead it's an ease-out animation. I haven't checked the source though.
- monocasa 5y agoThe 'Spring' field there is the K of Hooke's law.