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
- Animation Clip with Legacy enabled does not play when Time.timeScale is set to 0 despite Update mode set to "Unscaled time"
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
- SamplerState Property Missing Anisotropic Filtering
- Visual glitches when using Handles API
- The RGBA color values are inconsistent when comparing two identical colors set in the Inspector
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.