Forum rules - please read before posting.

Direct control in 2D games

edited October 2014 in Technical Q&A
Hey,

i noticed this in both my game and then checked the 2D Demo. When i'm using direct control the character seeems to just walk beyond the floor's navmesh area instead of being confined into it.

is that something that's not implemented (yet, i hope) or something wrong in my definitions?

Oded

Comments

  • When you're using direct control for your character I don't think it uses the navmesh (because you're controlling it directly). This is just a wild guess, but have you tried setting up colliders that the collider on your character can interact with?
  • i have not set up controllers yet, because i wanted to see the character goes around. it does, but then it just flies out of the floor area instead of being restricted to it like it does in point and clicking.
  • Colliders - not controllers.  Place down CollisionCube2D prefabs (or 2D colliders of your own choosing) to block movement.  As @Eastman points out, a NavMesh is not necessary to guide a player around in Direct control.
  • oh. i see. 
    I don't suppose there is some way to automatically create the colliders from the navmesh shape. 
    i think it might prove a challange doing this because the scene was build flat in 2D
  • No, there isn't I'm afraid.  But when you're working in 2D, doesn't that make it simpler?  You can work in the 2D view to place down Polygon Colliders of any shape.
  • i suppose. but i would need an inverse shape of the navmesh i created.

    i'll pit that on my todo list to try out in a lower priority for now.
  • two related questions - 
    1. the colliders won't interfere with it when you're in point and click mode , right?
    2. i didn't check yet, but i assume it's possible to change control modes during runtime in the options menu with actionlist commands, right?
  • edited October 2014
    @SoundGuy

    i suppose. but i would need an inverse shape of the navmesh i created.

    Yes, just use a couple of polygon colliders and you'll have it done in literally a minute or less. Super easy process.

    i'll pit that on my todo list to try out in a lower priority for now.

    It will literally take a minute to set up, just jump right in and you'll be done :)

    1. the colliders won't interfere with it when you're in point and click mode , right?

    Right, no, they won't interfere with point and click mode, at least not during my quick tests just now.

    2. i didn't check yet, but i assume it's possible to change control modes during runtime in the options menu with actionlist commands, right?

    That is correct. I took a few minutes to make a test scene to test all this out and I just used Engine:Manage Systems> Change movement method? to switch between direct and point and click movement modes, and neither one clashed with the other one.

    I recommend at least trying once before asking a question, then after a failed try or two come back here and ask. Failing is a great learning experience, I do it all the time and run into many useful things by mistake :)
  • @eastman yes, i usually try, fail, and then ask. 
    hence so many "this doesn't work, that doesn't work" questions :)
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.