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
- [XR] Input is not registered and headset view is headlocked after entering Play Mode with Meta XR SDK on 6000.0.0b16 and higher
- Crash on RtlLookupFunctionEntry when using 10 or more GameObjects with Articulation Body component in the scene
- Polygons are created on the opposite side of the Sprite when the Sprite boundaries are above the edge of the Texture
- Render Graph Viewer Resource list becomes shrunk after using a filter that yields no results
- [Android] [Vulkan] "VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT" not added on some Android devices in "com.unity3d.player.UnityPlayerActivity/2D Colour Attachement"
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.