Perhaps it has been spoken so much but I think it would be a good idea to improve the use of 3D characters in 2D backgrounds.
I do not really know if this is possible.
Many of us would love to use 3D characters rather than Sprites to improve fluidity and because once animation is created, such as the character that gathers something, animation can be used in every direction without having to create more animations with sprites.
But all this with the ease of use of 2D components, without having to place objects in 3D space, or using hotspots with polygon colliders, or even using a 2D navmesh ...
Currently, if I understand well through my tests, there are several issues like order in layers, walking in only eight directions, vertical walking, resize when the character moves away, and so on.
It would be really wonderful to be able to develop a game under these conditions.
If this was not possible, at least improve this approach as much as possible.
Thanks to Chris for his wonderful job.
Comments
You can already use 3D characters in 2D backgrounds - the 3D Demo game's character can be dropped into the 2D Demo and it will still work. A Follow Sorting Map component can be attached to the model, and it will scale the 3D character as it would a 2D one. But again - that's in the latest release.
The key issue with 2D/3D mixing is that of the layer ordering, i.e. getting models and sprites to display correctly relative to one another, properly taking their "order" fields into account. This, however, is a Unity issue - not an AC one. AC is not a graphics tool, but instead relies on Unity's rendering system. AC is able to modify the renderer components "order" values, but it is up to the shader being used to make use of them.
I was waiting for the latest release, I had read that you had improved some aspects in this regard. Strangely I did not get Unity's notice, I was working with 1.59.
Yes, now with 1.59a the character scaling works.
By eliminating Rigidbody and Capsule Collider and removing the Apply Root Motion check (modifying the parameters of Animator Controller) character moves and resizes.
Assigning to the Z field of Position the value of -1 the character remains in the foreground.
There are, however, two main problems.
In the UP and DOWN direction the character does not walk but slides, I guess because it is not in 3D space motion and is interpreted as vertical.
I think I have read that this movement needs to be included in the Animator Controller, is it true?
Another issue is that the character only moves in eight directions and this is terrible to see. In this case there are no solutions, right? This is very important for me, if the pure 2D does not allow 360 degree movements, I'm forced to work on the 2.5D mode or 2D Screen Space.
What can you tell me?
As for walking in 8-directions, I don't understand where that's coming from. Characters that have sprite-based animation engines (which your 3D character shouldn't be using) can limit animation to 8-directions, but even this does not affect movement.
What's your Movement method set to? I don't have that problem with the 2D Demo and Tin Pot - how does that behave on your end?
If you're not using Root Motion, then character movement and animation should be independent.
To be absolutely clear: are you talking about the actual movement of the character, or their facing direction?
facing direction is 90 degrees. This can not be solved because of 2D?
Root Motion will need to be off in a 2D game, even if 3D characters are involved. The Girl is designed to work with Root Motion in a 3D scene, so if Root Motion is disabled it will slow her down, of course.
Try this: open up char.cs and find line 646:
lookDir = new Vector3 (direction.x, 0f, direction.y);
And replace it with:
lookDir = new Vector3 (direction.x, 0f, direction.y / KickStarter.sceneSettings.GetVerticalReductionFactor ());
That will cause the Vertical reduction factor slider (which you can override per-scene in the Scene Manager) to affect the percieved y-facing amount of the character. See if you can get a slider value that produces a satisfatory result, and if so I'll look to see if such a change can be incorporated officially.