Announcement

Collapse
No announcement yet.

Problem with PlayerInput in May UDK

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Ok, is there any documentation about this? It looks like RawJoy values were post processed a bit in PlayerInput before setting aTurn, aStrafe, etc. How do we get the same effect now?

    Leave a comment:


  • replied
    Input changed at that time, try using RawJoy* instead.

    Leave a comment:


  • replied
    I can confirm that PlayerTick(float DeltaTime) inside the PlayerWalking state no longer receives values from the PlayerInput.

    I used to check if the Player moves the right stick in any direction (PlayerInput.aLookup != 0 && PlayerInput.aTurn != 0) inside my PlayerTick in the PlayerWalking state and I think I pooped in my pants a little when it suddenly didn't work anymore after I updated from March to May.

    Leave a comment:


  • replied
    Now if I call my UpdateAim() function from PlayerMove inside my walking and flying states everything works fine and the function even gets called when the pawn is not moving. This wasn't the case before and was the reason I moved it to PlayerTick, so something is definitely different now about PlayerTick. I know the function is getting called, but for whatever reason all of the input axes are just 0 there.

    Leave a comment:


  • started a topic Problem with PlayerInput in May UDK

    Problem with PlayerInput in May UDK

    In my player controller I have a function that gets called from PlayerTick. Previously, up until Feb UDK, everything was working fine. After updating to May all PlayerInput Input axes are returning 0 inside this function even though they work as expected elsewhere e.g. PlayerMove.

    Code:
    event PlayerTick(float DeltaTime){
        UpdateAim(DeltaTime);
        super.PlayerTick(DeltaTime);
    }
    
    
    /**
     * Updates the new aim direction from the right joystick. Tells the Pawn to update its 
     * skeletal controllers and animation to match. Called from PlayerTick to make sure it's instant.
     * 
     * Also handles calling Pawn's StartFire since aiming simultaneously fires.
     * 
     */
    function UpdateAim(float DeltaTime)
    {
        local Vector X, Y, Z, CameraLocation, NewAim;
        local Rotator CameraRotation;
    
    
        // Grab the camera view point as we want to have firing aligned to the screen space.
        PlayerCamera.GetCameraViewPoint(CameraLocation, CameraRotation);
        // Get the individual axes of the rotation
        GetAxes(CameraRotation, X, Y, Z);
    
    
        // Update aim
        NewAim = PlayerInput.aTurn * Y + -PlayerInput.aLookUp * X;
        NewAim.Z = 0;
        // If we have a pawn, update its aim rotation
        if (Pawn != None)
        {
            // This checks that we are actually getting input from the player
            if( VSize(NewAim) > 0 )
            {
                AutoPawn(Pawn).UpdateAim(Rotator(NewAim),DeltaTime);
                Pawn.StartFire(0);
            }
            else
                Pawn.StopFire(0);
        }
    }
    Specifically, PlayerInput.aTurn and PlayerInput.aLookUp are always 0 inside this function. I have tried replacing with aStrafe and aForward because those inputs are working fine in the PlayerMove function, but they also return 0 in this function, now.

    Any ideas?
Working...
X