I’m wanting to implement a feature that allows entities (observer and target) to track each other. That is, the camera is positioned at one entity and faces the other. Doing this with the Camera API has been pretty simple and successful but I’d really like to take advantage of
entity.viewFrom if possible because I would like to take advantage of the zoom functionality (slowly scaling down zoom as you get closer tot he entity) rather than manually implementing it myself. The
offset piece of
entity.viewFrom is where I’m getting stuck… I need a way to calculate the offset in such a way that it puts the camera at the other entity’s (the observer) position. My math skills have failed my thus far.
Anybody have any experience with this and can shed some light how it might be accomplished?