Forum rules - please read before posting.

Making a scrollable camera in 2.5D game & building navmesh on a handdrawn background

Hi guys,

 As I am currently in a bit of a predicament, my hopes have turned towards someone in the forum who could help me out of my situation.
You see, I have to make a scrollable camera ( in x and y-axis) as well as build a navmesh on a hand-drawn background with appropriate character scaling in a 2.5D game.
The character is 3D, the background is 2D of course.
I know this question has been posted a lot, I've been through all the discussion regarding this subject, but I haven't found in detail answer how that problem has been solved.
I hope, I'm not asking a lot, only for clear guidelines how to achieve that effect.
Going along the route explained in the 2.5 tutorial will not be possible, since the cameras are not static, and I have to achieve the parallax effect as well in some scenes.
I know Chris has recommended quite a few times making a 2D camera set to perspective, but I don't know how would that solve my problem since I'm not sure how to set up the scene in the first place.

So, how to setup the navmesh on a 2D hand-drawn background with a 3D character who must scale to achieve the feeling of depth, and with a scrolling camera?
Also, since the character has to move behind certain objects how to set up the scene in such a way that he is in front some objects and behind others depending upon his position?

Some have recommended making a plane and putting thebackground as a texture on the plane, but i would like to have character move behind certain layers and achieve the feeling of depths, as well as some particle effects such as fog which would have to blend with the character.

Answer to this question would be a life saver.

Comments

  • edited January 2018
    Welcome to the community, @Apolon.

    You can either go with the 2D camera in a 3D scene, or go completely 2D.

    3D characters still work in 2D, scaling etc, provided they have a Follow Sorting Map on their Skinned Mesh Renderer.  They do, however, need a shader that can react to changes to their sorting order made by the Sorting Map - this is how position-based sorting of characters and objects work in 2D.  For more on that approach, see the "Preparing a 2D scene" section of the Manual.  A scene's perspective can be set before clicking "Organise room objects" in the Scene Manager.

    For a 2D/3D hybrid approach, using the background as a texture with a 2D camera is also valid - see this tutorial.  If you need to be totally accurate w.r.t. fog, depth, lighting etc, then that's probably the approach you'd be better off with.
  • Thanks for your quick answer Chris. :)

    From what I've gathered going the last route truly is the best looking approach.
    So, if I've got you straight:
    I should make a 3D scene, put backgrounds as sprites, make a navmesh on a 3D plane in such a way that the character can move in front, behind certain objects which will be put as sprites, put  .background as sprite and put a 2D camera in the scene which will follow player on X-axis, thus making a parallax effect.


  • I would also suggest a 3d variant. For 2D images you could use sprites. In that way, you would have better control over the depth of the objects. The camera movement can , of course, be locked into axes if necessary
  • I have an update. I have managed to set up a scene in such a way that with the proper scalingof the character and the right camera angle I can achieve the feeling of depth, but now i have another problem.

    I have set up the nav mesh segments, baked them and the character should me able to move, but he simply refuses to move across the antire nav mesh area.
    And the navigation is directly connected with camera position and field of view, for example if i increase the FOV the navigation simply breaks.

  • That's correct about the method rundown.  The way you set up the NavMesh etc is no different from a regular 2.5D scene - it's still all in 3D space.

    Regarding this new problem, please share as many screenshots / detail as you can.  Do you mean that the character can't move across the whole area (but can some parts), or can't move around any of it?

    I'm also unclear about what you mean by "the navigation breaks".  You're using "point and click" movement?  Have you assigned your 2D camera as the Scene Manager's default, and are you getting any relevant messages/warnings in the Console?
  • Hi Chris and thank you for your fast replies and for your willilngness to help, I've sent you a messegewith screenshots that explains the issue in detail.
  • I think I understand the issue.
    It's simply the way camera detects navmesh, when I change the angle, so that in camera preview I can see that it covers a bigger segment of navmesh, my character can move there as well.

    I'm pondering going the 2D route, but I don't know how would that work since the character is 3D. How would the navigation and movement work at all, the feeling of depth perhaps could be achieved by moving certain layers in the Z axis, but lightning and shadows would be an issue. :/
  • The suggested route should all be possible - I've replied to your PM so that we can sort this out.
  • Thanks for your answer Chris and for the solution. :)
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.