Hi, I'm working on a prototype here and there and experimenting with 2d platformer integration. However the 2dplatformer controls are built from the ground up. I want to start integrating parts of the more immediate platformer elements from AC to the custom system.
Right now I'm facing 2 problems.
1. I don't know how to get the AC NavCam(main) to face direction. My controls flip MY character visuals, but not AC Player direction. So the camera offset is a problem. The offset doesn't flip to the left when I face left.
2. AC seems to be turning the 2d MeshRenderer from Spline animation 90 degrees. I'm overriding this for now, but knowing what's going on would help as I can imagine this being a problem down the road. Especially with problem 1, facing direction.
I tried looking through the script guide at the Player class, and the tutorial site, but didn't find an answer. Probably just overlooking something though. Any help would be much appreciated.
Comments
2) If you assign your sprite child as the Char script's spriteChild, AC will rotate this object to face the camera at all times. This is because, to allow for 2D/3D systems to merge, the base gameobject will rotate in 3D space (around the y-axis) - therefore the sprite child has to be compensated. If you are taking care of all this manually, try unsetting the spriteChild variable.
Making it a child of the sprite will keep it's rotation correct, however this will mean that the location is not dependent upon facing-direction (i.e. it will not be positioned more to the left if the player is also facing left). If you wanted more control over it like this, you could make it a direct child of the root (alongside the sprite), and write a script that auto-corrects the rotation and positions it based on the facing direction.