Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved camera #2

Open
freeman-lab opened this issue Jan 28, 2016 · 0 comments
Open

improved camera #2

freeman-lab opened this issue Jan 28, 2016 · 0 comments

Comments

@freeman-lab
Copy link
Contributor

Currently we are "yoking" the "lookat" style camera to the player by hardcoding a fixed relationship between player position and camera target and position, and the particular scheme doesn't account for rotation. We should fix this by tweaking this chunk of view.move

var t = transform.translation
this.camera.target = [t[0], t[1] + 20, 1]
this.camera.position = [t[0], t[1] - 60, 30]

where transform is the player's transform. Probably we'll just want to grab the rotation as well as the translation and then do the right calculation. Might also be cool to add more intuitive parameters (as opposed to several constant offsets).

cc @sofroniewn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant