2 ms·
They actually published papers in Game Programming Gems about how the camera works which was the real insight. To work right, it has to participate in the phys
by monocasa 5y ago
They actually published papers in Game Programming Gems about how the camera works which was the real insight. To work right, it has to participate in the physics system, attached with a spring to the back of the character you're playing as. When you do that, the control coordinate system being relative to the camera rather than the player seems natural to the playter. You almost need tank controls when the camera can just jump willy nilly, as the remasters of the original Resident Evils have proved.
- loloquwowndueo 5y agoYou don’t know what you’re talking about. We all know Lakitu is an accomplished cameraman, all the merit is his for being able to keep up with Mario :)
- pcwalton 5y agoPresumably 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.