|
Post by craigdennis on Mar 23, 2022 12:58:12 GMT
Hi, I have suddenly come across a weird issue when the camera is shaking and using rotation. As you can see in the video below when the player falls to the floor the camera shakes with rotation breifly, and then after the camera starts to shake without rotation as the boss appears in the room. The issue is, while the first shake (with rotation) is happening the "copper cog" asset on the left shakes all over the place like it's transform is acting in reverse to the rotation or something, but everything else is fine. When the second shake starts it sticks it's transform properly to it's parent, so I'm assuming it's just rotation that's the problem here. Some notes: It has the same parent as everything else within the room, it is on the same layer as other objects in the room. It is just using sprite renderer on the default layer. It's local transform scale and rotation are default. Maybe I'm just having a class durr moment after too much programming but I can't think as to what may be causing this. Any pointers or ideas are very welcome! Thanks in advance
|
|
|
Post by Luís Pedro Fonseca on Mar 30, 2022 8:02:55 GMT
craigdennis Sorry for the late reply. Can you please confirm that your parallax cameras are children of the main camera? And that the main camera is a child of a gameobject called PC2DShakeContainer?
|
|
|
Post by craigdennis on Mar 30, 2022 9:34:12 GMT
craigdennis Sorry for the late reply. Can you please confirm that your parallax cameras are children of the main camera? And that the main camera is a child of a gameobject called PC2DShakeContainer? Hi Luis! Yes as soon as the game starts the main camera sets it's parent as the PC2DShakeContainer transform. As for parallax I'm not using ProCamera2D for parallax atall it isn't enabled on the object, I've set up my own script for parallax objects for various reasons. Below you can see the "Remote Trigger" object is sitting in the same room as many other objects and props but it seems it's only this object that moves around strangely with the camera. Do you have any idea's what could be happening? Thanks I do appreciate the help alot!
|
|
|
Post by craigdennis on Mar 30, 2022 10:02:34 GMT
Holy hell!!! I just realised the Z Index! Oh man that's so embarrassing, so sorry to waste your time. It's fine now I've set the Z to 0 *epic face palm*
|
|
|
Post by Luís Pedro Fonseca on Mar 30, 2022 11:31:22 GMT
Haha, no worries craigdennis. Let me know if something else comes up.
|
|