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
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.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Any small change in UI Builder Inspector refreshes Editor Inspector
- Inaccurate Box Collider boundaries on a rotated child Cube when the parent GameObject Scale is non-uniform
- [Android] "SHADOWS_SCREEN" set as shader Keyword when no "_ShadowMapTexture" is bound leads to freeze on a build on some Mali GPU devices
- The global scene list is overridden in a project built with command line when the Override Global Scene List setting is disabled in the build profile
- [Linux] AutoLocale log is logged when opening a project
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.