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

camera constraint bug? #5065

Open
freder opened this issue Mar 2, 2017 · 2 comments
Open

camera constraint bug? #5065

freder opened this issue Mar 2, 2017 · 2 comments

Comments

@freder
Copy link

freder commented Mar 2, 2017

See more information in this forum post: https://groups.google.com/d/msg/cesium-dev/YN7Oq2WhJDA/hBOnztlPAwAJ


I have a model that is positioned relative to the camera, like so:

function posRelativeToCam(Cesium, camera, offsetHeight=3) {
	return Cesium.Cartesian3.fromRadians(
		camera.positionCartographic.longitude,
		camera.positionCartographic.latitude,
		camera.positionCartographic.height - offsetHeight
	);
};

// [...]

const listener = () => {
	entity.position = cesiumHelpers.posRelativeToCam(
		Cesium, 
		camera, 
		3
	);
};
camera.changed.addEventListener(listener);

I would expect it to always be upright, however I see this happen → screen capture: https://vid.me/IuMk


(I am on the 3d-tiles branch: 4bf21ab70a03d1a79a0923ba5b0c86afed05c6eb)

@hpinkos
Copy link
Contributor

hpinkos commented Mar 2, 2017

@freder part of the probem you're seeing is this bug where the camera gets stuck if you're using zoom limits #3984

The bug about zooming to the wrong location is a new one, so thanks for reporting that!

@freder
Copy link
Author

freder commented Mar 21, 2017

actually, I doubt it's related to #3984 — see https://groups.google.com/d/msg/cesium-dev/YN7Oq2WhJDA/rRjxBc3WCAAJ

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

No branches or pull requests

3 participants