How to setcamera`s default value when entity is tracked ()?

When I set "viewer.trackedEntity = entity",I find the camera looking the entity in a specific relative position in default.
Is there a good way to change camera`s default value such as Heading/Pitch/Range when entity is tracked?

Hi Yan,

The offset from a tracked entity is defined as a property of the Entity, “viewFrom” ( That property takes a Cartesian3 offset. Unfortunately, we don’t yet support defining a particular rotation for the camera when tracking, if say you want to look at a point besides the entity as opposed to directly at it. If you really need that, you can create either a child or parent entity of the original entity to track instead.

We’re currently working on a follow-camera: Which will hopefully add better support!

Hope that helps,

  • Rachel

Hi Rachel,

Thanks for your help! Now,I can give a offset use the “viewFrom”.

But for the rotation when tracking,I find I need to have a try to create an extra entity to track.But I have to say that it is really a nice idea!

Thank you so much!


在 2017年5月9日星期二 UTC+8下午10:19:00,Rachel Hwang写道: