Search Issue Tracker

By Design

Votes

0

Found in [Package]

2.6.1

Issue ID

1268001

Regression

No

Main Camera's transform.position does not get updated when using Virtual Camera

Package: Cinemachine

-

How to reproduce:
1. Open the attached "CameraPositionIssue" project
2. Open Scenes/SampleScene
3. Open Main Camera's Inspector window and lock it
4. Enter Play Mode
5. Move the Capsule Game Object in Scene View
6. Observe the Console window

Expected result: the camera gets stuck in (0,0,0) position, the console prints camera's POST transform.position as (0,0,0)
Actual result: the camera moves and tracks the capsule, but the console prints the camera's POST transform.position as (0,0,0)

Reproducible with: 2.2.9, 2.3.4, 2.6.0, 2.6.1 (2018.4.26f1, 2019.4.8f1, 2020.1.3f1, 2020.2.0a20)

Note:
- In the script, I'm setting the camera's position to (0,0,0) in the Update() method, expecting to see it stay at that position in the editor, but it does not, the camera moves and follows the capsule. After setting the camera's position, I try to retrieve it by using Camera.position and it returns (0,0,0), although it is not.

  1. Resolution Note:

    By Design. Main Camera transform is updated correctly by Cinemachine (in LateUpdate), when the Capsule is moved around in the scene. Cinemachine is setup to track the capsule, therefore changes to the Main Camera's transform are overwritten by Cinemachine.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.