Announcement

Collapse
No announcement yet.

Dynamic gravity for characters

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

    404 error for me as well with UE connected to github

    Edit: For those who have this problem after me, who also have little or no github experience like me -

    The "Epic Games" Team from Github will send you an invite to join the Team, this will allow you access.
    I believe the process is automatic, but the invite did not appear prominently for me until I followed a completely unrelated link to another UE Git repository, got the same error, then googled the team and went to https://github.com/EpicGames where the invitation was in a bar at the top of the screen.

    This now works.

    Last edited by 2_D_e_v_o_t_e_d; 09-07-2020, 04:48 PM.

    Comment


      Originally posted by sollaholla View Post
      Hello, I seem to be experiencing issues when using the plugin. I'm using Unreal 4.21.2 (vanilla), and 0.9.3 of your plugin.
      The issue seems to only occur on remote clients standing on movable objects with a rotation > 0,0,0. The problem however does not occur on the Listen server screen (each client is rotating/moving appropriately).
      I haven't noticed this reply until now, sorry. There are issues with rotating bases in online mode, you didn't do anything wrong, I'll take a look for sure.

      .
      Originally posted by Faptdivers View Post
      Any chance you could update this for 4.25? I've been trying to get it up and running for a few days now but there are a lot of errors when compiling via the "
      RunUAT BuildPlugin" command.
      I have a compatible version for 4.25, but there is no ETA sorry (2020).
      Ninja Character Code Plugin
      Visual Studio snippets for UE4
      ---------- ---------- ---------- ----------
      SonicGDK / Ashura: Dark Reign
      Heaven of Relics / Relic Madness

      Comment


        New version of the code plugin has been released HERE, compatible with UE 4.25 and includes more features.

        If you're upgrading from plugin 0.9.3, stuff might be broken, since some names were changed.
        Ninja Character Code Plugin
        Visual Studio snippets for UE4
        ---------- ---------- ---------- ----------
        SonicGDK / Ashura: Dark Reign
        Heaven of Relics / Relic Madness

        Comment


          Hi Xaklse

          was wondering about the new features and possible bug fixes (that multiplayer bug you mentioned before)?

          Our project is using an older engine version, so contemplating to upgrade the project or not. Could you please elaborate

          thank you!

          Comment


            Yup, I fixed the multiplayer camera bug I recorded in the video I posted, I think most of the related code went into the NinjaCharacter class.

            New "hidden" features that I can remember include:
            • Added more blueprint events.
            • Added cheats to draw in-world debug information.
            • Allow capsule rotation from bottom sphere as pivot (while walking mainly) (bRotateAroundCenter).
            • Allow to keep speed magnitude when the capsule rotates (bRotateVelocity).
            • Added check for gravity direction to know if the surface is walkable when landing (bLandOnAnySurface).
            But new critical multiplayer bugs were noticed after upgrading from 4.22 (moving bases broken, location desyncs), keep that in mind.
            What's the engine version you're using?
            Ninja Character Code Plugin
            Visual Studio snippets for UE4
            ---------- ---------- ---------- ----------
            SonicGDK / Ashura: Dark Reign
            Heaven of Relics / Relic Madness

            Comment


              thanks for your reply!

              we're still on .24.3

              Comment


                If the engine upgrade is impossible or undesired, let me know.
                Ninja Character Code Plugin
                Visual Studio snippets for UE4
                ---------- ---------- ---------- ----------
                SonicGDK / Ashura: Dark Reign
                Heaven of Relics / Relic Madness

                Comment


                  The only new function difference had to do with rootmotion, which we dont use

                  I replaced 2 if statements in movmementcomponent using this bool function:

                  if (!HasAnimRootMotion() && !HasOverrideVelocityWithIgnoreZAccumulate())

                  to:

                  if (!HasAnimRootMotion() && !CurrentRootMotion.HasOverrideVelocity())

                  seems to work fine on 4.24 now, thanks!!

                  cheers
                  Frank

                  Comment


                    Hi Xaklse

                    I had to make a local change to get smooth movement on the player for our project. Using a (quite big) spherical world seems to make the delta between old-new gravity directions too big to get a smooth transition .

                    Therefor I had to disable the return statement in ninjacharacter.cpp (which sets the control rotation).

                    Also added a rotator lerp in the movementcomponent (that still has the return statement a few lines prior).

                    Do you think this will have a huge impact on performance eventually? If so, what would you recommend to smoothen out the (rotational)movement? Using camera lag smoothens it out a little, but not entirely (and we rather don't have much lag on the camera)


                    NinjaCharacter.cpp line 223:

                    Code:
                    if ((LastAxisZ | NewAxisZ) >= THRESH_NORMALS_ARE_PARALLEL)
                    {
                         //return;
                    }
                    NinjaCharacterMovementComponent.cpp line 5380:

                    Code:
                    // Abort if angle between new and old capsule 'up' axes almost equals to 0 degrees
                    if ((DesiredCapsuleUp | CurrentCapsuleUp) >= THRESH_NORMALS_ARE_PARALLEL)
                    {
                         return;
                    }
                    
                    //// Take desired Z rotation axis of capsule, try to keep current X rotation axis of capsule
                    const FRotator NewRotation = FNinjaMath::MakeFromZQuat(DesiredCapsuleUp,
                    UpdatedComponent->GetComponentQuat()).Rotator();
                    const FRotator CurrentRotation = FNinjaMath::MakeFromZQuat(CurrentCapsuleUp,
                    UpdatedComponent->GetComponentQuat()).Rotator();
                    
                    if (!bRotateAroundCenter)
                    {
                         float PawnRadius, PawnHalfHeight;
                         CharacterOwner->GetCapsuleComponent()->GetScaledCapsuleSize(PawnRadius, PawnHalfHeight);
                    
                         // Rotate capsule around the origin of the bottom sphere
                         const float SphereHeight = PawnHalfHeight - PawnRadius;
                         const FVector Delta = CurrentCapsuleUp * (SphereHeight * -1.0f) + DesiredCapsuleUp * SphereHeight;
                    
                         FRotator RotationLerp = UKismetMathLibrary::RInterpTo(CurrentRotation, NewRotation, GetWorld()->GetDeltaSeconds(), 4.0f);
                    
                         // Not using MoveUpdatedComponent to bypass constraints
                         UpdatedComponent->MoveComponent(Delta, RotationLerp, true);
                    }

                    nonetheless, nice work on the update!! Especially the new debug options are really useful!

                    Comment


                      I took the liberty to answer you HERE, let's leave this forum thread for 0.9.3 upgrade issues, please.
                      Ninja Character Code Plugin
                      Visual Studio snippets for UE4
                      ---------- ---------- ---------- ----------
                      SonicGDK / Ashura: Dark Reign
                      Heaven of Relics / Relic Madness

                      Comment

                      Working...
                      X