Heyo,
I've been making a 3D game with 2D sprite characters. It all works really well, but I've found something weird when trying to make the cameras follow the player: when the camera is rotated 180 degrees and has to follow the character (either with X position or spin rotation), it interprets the direction the wrong way around. When the character moves to the 'right' on the screen, he's actually moving left on the X axis in world space, if you know what I mean. But the camera seems to always move according to its own relative X axis, which goes into the other direction (because it is rotated, its local X axis is rotated 180 degrees from the world's X axis or the character's X axis).
I have a character made through the wizard:
- position 6X 0Y -4Z
- animation engine: sprite unity
- motion control: automatic
- multiple directions on
- diagonal sprites on
- frame flipping: none
- rotate sprite to: camera facing direction
- turn root object in 3D: on
- move with rigidbody: on
The camera:
- position 6X 1Y 0Z
- rotation 180 Y to face character
Comments
I made a new empty scene in the project, threw down a plane with a navmesh and playerstart, added a gamecamera, rotated it 180 degrees and set it to follow my player, then hit play. Works perfectly, of course. The spin rotation did go the wrong way, but I could fix that by setting the influence to -2 instead of 2.
I added a gamecamera the exact same way to my other scene, and as soon as I hit play it flies all over the map. For following the X position I have to set the influence to 0.01 to even get it near my character, otherwise it shoots off a mile away. And I have to set a massive offset to get the spin rotation to face the player. Very strange. The components and all are the same, no weird layers or nesting.
I'll make a stripped-down version of the scene tomorrow to send it to you for diagnosis.