Forum rules - please read before posting.

Hotspot-based movement with UFPS

How do I get hotspot-based movement going with UFPS? I'm using the Camera&Controller AC prefab and trying to use a hotspot with a simple Walk To Marker set. It's not working.


  • Any errors in the Console log?  What about when you use the "Character: Move to point" Action (both with and without pathfinding enabled)?
  • edited March 2015
    Maybe I should start a new thread for this, but you should know overall our adventure game interaction is designed as if the player is wearing a VR headset, with the mouse and joystick moving the head around, and one button to select the hotspot being aimed at. AC seems to turn off free-aiming while walking to a hotspot, along with rotating to face a direction upon arriving at a destination, and if you try to look somewhere it fights you continuously until it faces the given direction (very frustrating user experience). I was thinking there were settings to turn these off, but I can't get that to work. UFPS is actually my attempt at a way to turn these behaviors off, since previously we wrote a bunch of edits to underlying AC subsystems to get this working, and certain edge cases created a bad experience in terms of jerky camera movement and such.

    And sorry about that, I should have been much more specific with my report. After clicking on the hotspot, the camera snaps the view quickly to the hotspot, which has the visual effect of jerky movement, the game state changes to Cutscene, then the player seems to freeze as if its going to move toward the hotspot, but never actually moves. No errors or warnings. Move to Point with pathfinding both ways doesn't work, either.
  • Ok I got it working, at least temporarily modifying AC until a more official solution can be found (I'm kinda in a hurry preparing for SXSW). I made 2 code changes to get this to work, although the camera (player?) is still fighting me wanting to turn toward the current movement direction:
    • Char's MoveUpdate, two places where _characterController is checked, comment out the if blocks that don't do anything if UFPS is the MovementMethod.
    • PlayerInteraction's UseObject, where game state is set to normal and hotspotMovingTo is set only if not using UFPS
    Unfortunately, this gets me to almost the same behavior as AC's first person, accept weird fighting with the looking while walking.

    I have a feeling the real solution is going to either involve a) allowing the FirstPersonCamera to look side-to-side independently of Player or b) allowing the player to slide sideways while walking instead of moving the direction its facing.

    I'd love other suggestions, though. I personally feel this issue is important for those who want to make VR adventure games using AC, as that's basically what we're simulating.

  • Rather than get bogged down in working out the solution, let's back up.  So this is about having an option to always allow free-look, even during cutscenes?  That shouldn't be impossible, but I want to be clear about what you're asking for.
  • edited March 2015
    Yeah sorry, I was hoping to have a new build ready about 90 minutes from now when the Gaming Expo starts, so I was running ahead trying to get something going with hacks basically.

    But yes, always free-look, and then we have a few cases here and there where we lock the view and animate letterboxes in to signify a cutscene.

    We're trying to strike a balance between accessibility with point and click, and immersion with FPS. We've settled on FPS-style free-look along with hotspot-based movement. And I recently realized it's basically the same thing as a VR headset with point and click where the cursor is look direction. We've had a great response as we've playtested at festivals with 1500+ players with this setup; but most of them intuitively want to look around while going from hotspot to hotspot, and when arriving at a hotspot.
  • edited March 2015
    I've been looking into this, and it's quite a problem.

    The camera must always face forward - this is true for both UFPS and AC first person - but characters must also move forward.  This means that free-aiming while moving to a Hotspot would cause the player to go off course.

    Rather than using UFPS, I would have to suggest using a custom camera script.  You may even get by with parenting the MainCamera to the player and not even having any other cameras - if you don't need them.

    EDIT: Another solution would be to rely on a camera that simply copies the player's position, rather than a true parent-child relationship.  This would ensure the camera's rotation is properly independent.
  • Thanks Chris! It's great to know the direction you'd advise. Yeah I've since given up on UFPS, and since my post on the 12th, I've tried to implement a camera that copies the player's position, which works for the most part. I'll keep going in this direction for now.
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.