Forum rules - please read before posting.

UFPS - using first person physics

Hi!
Thank you (author) for such a nice framework. I am going to use it for my games. But to do that I need to solve some issues first. I am trying to use UFPS player to drag physics movable pickup box (without mouse locking). And seems it works only if I am not moving mouse cursor after starting scene. Can you provide some steps how to do this or it is kind of bug?

Reproducing steps:
Create Player prefab by manual.
Create empty scene with plane to walk on.
Add moveable pickup (replace collider on box + add cube mesh filter and renderer).
Try to carry this box using mouse without cursor locking.
«1

Comments

  • So long as you're not using weapons, you can get around this by opening up UltimateFPSIntegration.cs, and commenting out line 162.

    That script is designed to be duplicated and modified to suit your own needs, but I'll look into fixing that particular issue in a future update.
  • edited January 2016
    Thank you for a quick answer. Seems just commenting out of line 162 is not helped.
    I made a small proof video for you =)
    https://youtu.be/Zn0hKWXVwqw
    as you can see I can pick up box only when camera is looking straight forward and mouse is unlocked.
  • Don't worry - I wasn't doubting you!

    Do you also have the CursorHorizontal and CursorVertical inputs mapped to your X and Y mouse axes respectively?
  • edited January 2016
    You are right, I am forget to do that. But it`s not helped much.
    Now it some time can be picked, but it fires up like crazy and all time shaking =)
    https://youtu.be/8XfUQbMVnAo
  • The first thing to do is to separate the problem from UFPS, so that it doesn't get in the way of testing AC.  Remove your current player prefab from the scene and place in Tin Pot (from /AdventureCreator/Demo/Resources).  See if you can get the correct behaviour working with him - if not, it could be just that your new input sensitivity/gravity values need tweaking.
  • edited January 2016
    You are right - with Tin Pot it works correct.
    I checked with prefabs which you made (from download page). AdvancedPlayer and Camera&Controller works wrong. This means that problem on UFPS integration side.
  • They both work OK for me.  What version of UFPS are you using?  I'm working with 1.5.1.
  • I am using 1.5.2
  • edited January 2016
    I'm afraid I had to delete your last post - never, EVER, post the source code to Adventure Creator publicly.
  • edited January 2016
    You are right, sorry for that. I just didn`t find how to send private message.
    Did you download that link, can I delete this archive?
    Otherwise how can I send you test project?
    • Tag your UFPS camera as MainCamera
    • Check "Disable Weapons" in your Ultimate FPS Integration component
    • Open UltimateFPSIntegration.cs, and comment out line 310
  • edited January 2016
    This line?
    309:
    if (fpInput)
    310: {
    311: //fpInput.MouseCursorForced = !state;
    }
    It`s a bit better, but box movement is very jaggy and it is firing up like a crazy most of time time.
  • still need help here  :-S
  • edited January 2016
    Patience, please - I reply to the forum when I am able.

    I will be releasing a fix soon that will solve the tagging and script issues.  However, the jaggy movement (when the cursor is locked) can't be completely removed due to the conflict in the inherent way that UFPS and AC both work.
  • edited January 2016
    Hi there!
    I am patient but time is running :-) Any news?

    Camera tagging issue (switching tags in each frame) also leads to uncomfortable camera jittering in build, and produce same problems with hotspots picking as with moveable picking. So in general it is not usable now with UFPS.

    Maybe you can provide some rough time estimation? Than I can understand should I try to make my own integration with UFPS or it have sence to wait for official fix or it is not possible to do and I need to search for something else? It is usually easier to wait when you know what you actually waiting for and how long you need to wait :-)
  • Have you tried the latest build?  I already made some improvements to AC's UFPS integration.  The box movement should be improved, but can't be made better due to the fact that AC and UFPS inherently work in very different ways.

    See how it is for you now, and it should at least be easier for you to duplicate and then mofify the UFPS integration script to tailor it to your own needs.
  • I am using 1.50f version. In code of UFPS Intergation which enables camera I see part witch changes UFPS camera tag in each frame, which cause camera jittering along Y axis (because AC main camera transform has forward direction all time perpendicular to Y). You can see this jittering if you just visualize UFPS camera front vector via Debug.DrawRay in each frame. And all possible negative effects with picking are caused by this. Even more - in PC build you can see very annoying shaking of image on the screen, so it is not acceptable behavior at all.
  • edited January 2016
    The jittering should be limited just to objects being "dragged" by the player - not the player movement itself.  The camera tag should not be changing each frame - are you using any of the downloadable UFPS players, and have you set the Movement method to First Person?
  • yes, have you checked camera front vector with Debug.DrawRay?
  • I haven't had to - like I said, the movement is smooth on my end.  During regular gameplay, AC should relinquish all camera control to UFPS.

    In your UltimateFPSIntegration script, you'll see that the code block starting line 146 should be the only one run out of the four from 136-170 during normal gameplay.  Try using Debug.Logs to determine if that is not the case for you.
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.