Forum rules - please read before posting.

Feature request: Point and click/drag movement method hybrid

I don't know if this is not possible for some reason, but it's something I have been trying to implement (unsuccessfully, as I can't program and only have playmaker to help me). The game that I'm working on works best with regular point and click navigation much of the time, but there are times when the player needs to move a longer distance in the world space and the camera has to follow, making clicking awkward and tedious. This is especially true if the camera is relatively close to the character and they are meant to traverse a distance of several camera widths.

Ideally I'd like the engine to still use the navmesh like normal and not be able to navigate off of it. The way I was trying to make this happen with playmaker was adding an FSM that understands when the mouse is being held on the navmesh, and then automatically (at set intervals, about 1 second) "re-clicks". It would have been like the navmesh had 'fully automatic' clicking so that when the mouse was held new targets for the player character were set every interval. Unfortunately playmaker can't send a mouse down event to the system, so I hit a dead end. That may be a horrible approach even if it did work, but something like that would be a huge help to me and seems like it would be a generally useful thing to have. Any chance of an update like this?

Thanks!

Comments

  • I see your point, but continuously calling the mouse button to pathfind is not really something that's feasible, because you'd be having to perform pathfinding calculations every frame.

    AC has "Straight To Cursor" and "Drag" movement methods that behave similar to how you're describing, but they don't involve pathfinding, and you have to use Colliders to stop the player from moving through objstaces.
  • I see what you mean there about calculating every frame... Is there any potential for a middle ground here? I'm thinking of a game like Kentucky Route Zero, where there is a click marker for a single click and the character runs there, but holding the mouse down causes the player to follow the cursor around the navmesh. A nice feature of their set up is also that the character stops and returns to idle if you lead them to the edge of the navigable space, rather than running against a barrier.

    I'll look further into switching to straight to cursor or drag if necessary, but it'd be really nice to maintain regular point and click as well. Thanks for the suggestion! 
  • Straight To Cursor movement also has an option for single-clicking to move the player in the cursor direction.  At the very least, I'll add an option for this single-click to perform pathfinding, so it'll behave like reguar Point And Click movement.
  • That's great, thanks Chris!
  • Simple to do, so I managed to include it in 1.43.
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.