Any other Unity devs having trouble using camera relative movement with Cinemachine? 2020-07-24 04:12:40
Hey all, I'm messing around in Unity trying to make a 3d game, and I've been using the Cinemachine camera. It works wonderfully in terms of rotating around my character, etc. Feels good, works good, input for rotating it works. Simple.
However,
I need my player character's movement to be relative to the angle that the camera is facing instead of the worldspace so that you can actually, like, go places and understand what's happening lol. I found various tutorials, etc. on this and I managed to get it to work kind of but it doesn't quite... do it... right.
Instead of making the player's "forward" directly correlate to the direction the camera is facing, it just kind of... flips it? It's a bit difficult to explain. Basically when the camera's rotation is any positive value, the player just moves around in relation to the worldspace like I didn't program anything at all, then when the camera's rotation value is negative, the controls completely flip so the player is facing the opposite direction, but it's still only relative to the worldspace. Everything is just opposite.
My main question is: Anyone who has experience with Unity, does Cinemachine not work well with camera relative movement at all? If the answer is "no, it should work fine" and it's probably something in my code, I'll gladly post it and try to work through it if anyone wants to help out. If the answer is something like "Yes Cinemachine is terrible for that" then I'll just have to start over in regards to the camera.
