Parametrized camera follow snippet


(azrafe7) #1

After answering Camera assistance I played a bit with the camera and got this: online swf | download (105.9 KB)

Thought I could share the code as well in case someone might find a use for it: https://gist.github.com/azrafe7/11382393

It’s just a proof of concept and variables should probably be refactored into class members. Actually the whole functionality should be moved in a new class with methods to set the Entity to track and other useful stuff, but that’s for another time.


(Jacob Albano) #2

Looks great! I like the smooth transition of the camera back to focus on the box when you stop moving.