Hello everyone, What I want to do is that when I move the player left or right the value of ScreenX (Body -> Framing Transposer) should change from 0.5f to e.g. 0.15f. What I do: - added three new variables in CinemachineFramingTransposer (m_targetPos2DX, m_targetPos2DXMin, m_targetPos2DXMax) to check if the yellow point is out of the rect; - I check in my script the position of yellow point and change ScreenX according to point position; I must say that the effect I earned does not fully satisfy me. Any advice how can I do this better way?
My point is that I wan't to show more scene for player according which direction he's actually walking. But the most important question is that my idea is good or bad? Should I change ScreenX or do something else?
Yes, I was working around with this but it's only working good when player's running. When he's walking camera isn't so much in front of him. Maybe I'm doing something wrong..
You'll have to better describe the behaviour you're looking for. Certainly you could animate the Screen X position as a function of character velocity. I would do that in a separate script alongside the vcam, instead of hacking the FramingTransposer. Your script can access the FramingTransposer like this: var transposer = vcam.GentCinemachineComponent<CinemachineFramingTransposer>()
What I'm looking for: Player stays and don't move. Camera's in the middle of the scene. If he moves to the left or right side od the screen and camera point is out of the DeadZoneWidth, I want to change ScreenX respectively to the direction he's going and show more screen in front of him. I know I can access to the FarmingTransposer but I can't get the values when the "yellow point" is out of DeadZoneWidth. I'll check your idea with animate the ScreenX position.