Forum rules - please read before posting.

Setting up Input Axis Mouse X and Y for UFPS

edited March 2015 in Technical Q&A
Trying to get UFPS to work.
Main problem, mouse movement and rotation of the character using the mouse, 
Im getting an error that:

UnityException: Input Axis Mouse X is not setup.
 To change the input settings use: Edit -> Project Settings -> Input

and the same for Y

I roughly know how to do this, but do you have some settings you could share, pref with screenshot?


all other problems now are probably related:

They are, 
computer mouse flicker and locked to top of screen within inventory area, 
Inventory stuck open at some times (I think when I tryied UN tiocking Lock cursor in screens center...

What is the screen lock thing, and how does this work with AC in first person?
Is this a state I invoke ONCE the player clicks on something, and is released on exit? Or is a thing the user can invoke, so kind of like having a Walking and movement mode and an interacting with stuff mode.

Id hope not to HAVE to explain key or mouse usage before the game starts... Id want it to be pretty self explanatory.





Mark

Comments

  • The error you're getting is a a UFPS related one, not AC, but there is a good explanation of working with inputs here.

    As for your Inventory: If you've modified your menu at all from the default, then you'll need to describe what you've done before I can give specific help.

    Adventure Creator has two cursor modes when working in first person: Locked in the centre (so that free-aiming is allowed), and Unlocked (free-aiming is not allowed).  You can set the default mode in the Settings Manager (Lock cursor in centre at start).  You can toggle between the two by having the Player press a key mapped to the ToggleCursor input button.  You can also use the Player: Constrain Action to enable or disabling free-aiming yourself.
  • edited March 2015
    Hi!
    Yes Im sure it is, but if someone has implemented UFPS into AC arent they getting this message?
    What I discovered is that creating an input called Mouse X and Mouse Y DID work IF I pressed down a mouse button at the same time. This is NOT normal UFPS control which will rotate around just by touching the mouse. And weirdly, there is an input there from before with EXACTLY the same settings, just that its called CursorHorizontal.. is this the control for mouse movement in AC?
    heres my input Manager...
    https://www.dropbox.com/s/eb9ar4l507mhpc3/Input Manager.jpg?dl=0

    Anyhow, it might be working now.
    When "Lock cursor in screen´s centre when game begins" is UNclicked, then I DO get the circular cursor, which can go up and activate the inventory, but cannot rotate the player at all.. when the above is NOT set, I CAN rotate the character but only by PRESSING DOWN the mouse.
    IS THIS CORRECT?
    Is it normal that the user should have to press a button in order to lock his movement but release the cursor so he can interact with things, if you take the classic 1st person games like Half Life or  Bioshock, I think you just click on stuff.
    I DO see that they dont have the level of interaction with objects that is possible with AC, so maybe thats where the issue lies. So what happens in Amnesia?... (thinking aloud now...)

    Now.. what MIGHT work for me is if NORMAL operation is cursor mode, that it can move around and click on stuff, EXCEPT when its not clicking on stuff in which case it revolves the camera.
    As I said, that kind of how it is for me now, except IM locked to the clicking down operation, doesnt release to let me interact.

    Another issue is this computer cursor that is hanging around all jittery see video below..

    OH.. And do you happen to know where the 10% text come from? in the bottom left?
    I had UFPS working in this game perfectly, that corner before had a health text, but it didnt look like that, so it doesnt seem to come from UFPS...
  • Edit time ran out..

    I opened a backup of my old UFPS project, (2 unity instances open at once... my poor computer) and copied a few missing inputs over. They were Jump, and different Fire buttons... 

    I really dont know what I did, but now it works, at least, I now rotate properly without having to press mouse.
    Now I need to come up with a good solution for interacting... but really dont know what it should be... I really dont like the idea of a button you must press... Can Right click unlock lock the screen? Does THAT work?

    By the way, the hardware cursor is still there... jittering away on top... any ideas about THAT?

    Mark




  • edited March 2015
    I apologise if you're getting frustrated, but we'll sort this out.

    Toggling the cursor is totally optional - you can still interact with objects when the cursor is locked and in the centre of the screen.  But you can map the ToggleCursor to whatever button you like - I believe mouse button 1 would map it to the right-click.

    I've encountered the hold-to-rotate issue before, but it's difficult to work out the line between AC-side issues and UFPS ones.  I'll be taking a new look at the UFPS/AC workflow shortly, and hope to have these kinks sorted out in the next release.  Thank you for your patience in the meantime.
  • edited March 2015
    When you say:
     "you can still interact with objects when the cursor is locked and in the centre of the screen"

    What you mean? If the cursor is locked to centre, it can hover over or click on a hotspot, but cant do anything with the inventory.. can it.. to interact with that youd need to release the cursor somehow..

    I tried adding mouse 1 as in input for ToggleCursor, and it half worked.
    True it freezed the mouse rotation, but DID NOT allow me to move the cursor from the center of the screen, it was still locked, so I couldn't move the cursor to the Inventory (top) or the menu button (below).

    Mark
  • OH.. and jump doesnt work...
    :(
  • I was referring to interacting with Hotspots, not Inventory.  In any case, I'm making good progress with going through the various issues with AC and UFPS.  I'm hoping to have 1.43 out next week - I hope that you can wait for it.

    UFPS recently made some big changes to the way it works, which is why these problems are arising.  I hadn't realised at the time, however, that it also made certain operations much easier to do.  Now that I'm aware, it's looking like the process will be much more simplified.

    At this stage, the new steps to convert a UFPS to AC are looking something like:
    -Drag the UFPS player into the scene
    -Add the Player component to the base
    -Set the FPCamera object's tag to Untagged
    -That's it! (Hopefully)
  • edited March 2015
    Thats GREAT!!!I can certainly wait until next week.
    Maybe it will address some of these issues.
    Video Link foloowing (sorry no sound, couldnt be bothered to link up the Soundflower thingy to Quicktime.. imaging rain wind andn dark mysteriouse music)

    https://www.dropbox.com/s/h1vv4thzyny59zu/Death_on_scene_change.mov?dl=0

    This film demos 3 problems

    1. first few seconds, you see cursor jump up a bit, thats me right clicking, which I have set to release the cursor so I can interact with menu/inventory, unfortunately its stuck

    2. As I approach teh hospital you see me stop breifly, thats me hittin space, and trying to jump, I have set up a jump axis, but no jump.. (havent even tried crouch yet.. assuming the same problem)

    3. You see me hit the hotspt that is placed over the door of hospital, this should load new scene (would like fade out here... suppose thats justa  fade action before the scene swap action) 
    BUT then as soon as I arrive, ... I DIE!!! You can tell this from the message WHAT? and the sudden Health readout of -414-- which is somewhat impossible too...





  • I've noticed that sometimes the cursor requires a click inside the Game window before it registers properly - this is just a Unity Editor thing, and doesn't affect the build game itself.

    I've fixed the issue with the UFPS jump/crouch sometimes not working.

    I can't say for why your player is dying - perhaps this is an issue on the UFPS-side.  Either way, it's probably best to wait until the update is out, and see what improvements that brings to your game.
  • Still cant get Jump to work..
    But figured out the Death thing...

    I had forgotten to add my level geometry to Ignore Raycast. Dont know why, but that fixed it!

    Mark
  • Here is the simplest way I found to get them going, to a degree at least. 

    Take the prefab from UFPS, lets use "Hero". 

    - add "player.cs" script (from AC) to the main game object
    - in vp input under mouse cursor tick forced always shown, untick block mouselook
    - tag fps camera as firstPersonCamera

    Them 3 small steps should allow a UFPS guy to work, the guns and stuff wont work properly, but he can walk around and interact with hotspots etc..  Let me know if you get the guns and hotspots stuff working together :) I also posted a script on your other thread about flipping between an AC guy and a UFPS guy, which is "good enough" for now for me, maybe :)
  • Thanks radiantboy Im gonna give that a try.. I never tried "hero" Is that the 3rd person UFPS player? I haven't tried the 3rd person version yet... 
    Weirdly I DO have guns working, infact I have added a torch... what I dont have it being able to equip them via the AC Inventory, which I would like.


  • The steps to make a UFPS/AC player prefab have changed with 1.43 - please see them here.
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.