-
Notifications
You must be signed in to change notification settings - Fork 74
phoenix.Camera.center confusion #251
Comments
There are definitely some things going on that are being resolved in the new vectors (mentioned in the dev log briefly) and there are a few issues already listed for this like #110 #106 I noticed you mentioned focus as a way to follow during a movement - that's a tween and will create a new tween every time you call it, which is not ideal of course. If you want to follow with some form of smoothing you should look at Vector weighted average or the maths counterpart it's using. Then every frame you do With regards to the center: can you run |
OK, I see now. Then I won't submit a pull request, since its probably not going to be valid once those systems are rewritten. Got it. |
While I was looking at the internals of luxe.Camera and phoenix.Camera for another reason, I came across the problem I was experiencing. pos.ignore_listeners = true;
pos.x = _p.x - (viewport.w/2);
pos.y = _p.y - (viewport.h/2);
pos.ignore_listeners = false; The position vector is updated, but ignore_listeners is set to false, so the change doesn't propagate properly. A solution would be to swap the last two lines. pos = new Vector(_c.x - (viewport.w/2), _c.y - (viewport.h/2));
return view.center = _c; By setting Until this is fixed, you can force view.pos to be updated by doing |
Setting phoenix.Camera.center does not effect the camera immediately.
These features are also broken as a result: luxe.Camera.center, luxe.Camera.focus.
The text was updated successfully, but these errors were encountered: