Forum rules - please read before posting.

3D mode with 2D characters - how this can be done?

edited June 2016 in Technical Q&A
Hi everybody,

I am trying to recreate a visual style like "Don't Starve", which uses 2D Sprites in a 3D world. 

My problem is with the Player: I am not able to make him walk around the 3D-navmesh and at the same time make him face the camera, with the sprites changing.
In 2D my player works perfectly, I would just need him to move around a 3D Navmesh rather than on the 2D Navmesh.

Do you have any tip on how to create such a player GameObject, maybe through the wizard, and then tweaking its components?

[more details:]
In AC so far it is possible to have a 2.5D approach, but it presumes that on a 2D Background I would use a 3D character, but I need a 2D character in a 3D world. and I was not able to set up the 3D component (I guess capsule collider, rigidbody and path script) to the 2D player gameobject, in a way that works. 
I am using unity-navmesh. I tried to set up a hybrid player, generating it from the wizard as 3D, and then attaching the 2D sprites and playing around the Settings Managers with the Camera Settings (set to Unity2D). But I feel that it would be easier to tweak a 2D Player, making him follow a 3D Navmesh, but the "2D" settings of AC does not allow me to create a 3D Navmesh.
Also, the camera will be fixed -- so now you would be wondering why I want to set this thing up in 3D if I use 2D chars and fixed camera, but it is for a particular visual approach I need to make. 
I also tried to follow the approach described in this official video which I understand is obsolete: I am trying to achieve exactly something like this (2D player built on a 3D navmesh), but to my understanding AC changed since then (it is a 2D top-down approach) and it is not possible to do that anymore.
[/end of more details]

Any ideas? Thanks !!


Comments

  • If you give a character 3D components (capsule collider, rigidbody) as well as a standard sprite child, then it should work automatically.  Try using the Character Wizard to create your character - if you make a 2D character when the game's Camera perspective is 3D, it'll prompt you that you're about to make a 2D character for 3D game.
  • Hi Chris, thank you very much for your reply! 

    Super cool, you are right! I can see the wizard prompting me "It has been detected that you are attempting to create a 2D character in a 3D game. Is this correct?" with the checkbox.

    Thanks, this is exactly what I was looking for!

    I have another question related to this: I am following your (awesome) tutorial https://youtu.be/bf51Nc-gFxY?t=1h11m34s and I am experiencing the same problem mentioned in the last comment, i.e. the whole navmesh becomes black, rather than invisible -- I used the MatteShadow material linked ias suggested (here) -- how can I achieve this effect of displaying only shadows? I found this thread on the Unity forums, but is 7 years old(!), maybe you have a suggestion.

    Thanks again!
  • It could be that it's a matter of shader code not having the same effect as before due to changes in Unity itself.  I didn't write the MatteShadow shader - in fact it's from the very thread you linked to.  Unfortunately I don't know anything about shaders, so you'd have to bump that thread or ask elsewhere on the Unity forums to find a new solution for 5.3+.
  • Ok, if I find something that works I will post it in the forums. Thanks again !
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.