Announcement

Collapse
No announcement yet.

Dynamic gravity for characters

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

    Originally posted by Xaklse View Post
    I have an updated version of NinjaCharacter, this time working for 4.19 as a plugin, with several fixes and expanded functionality.
    I need to fix a grave bug that happens in online mode only, before considering a new release for everyone.
    .
    Does this by any chance has to do with movement updates and a ServerMoveHandleClientError() ?
    Have been using your NinjaCharactermovement code for a while now (currently also in 4.19). However, I recently started working on online implementation, and keep getting crashes once the client pawn moves.

    Thanks for all your work on this, and sharing this!

    regards
    Frank


    UE4Editor_PointGravity!TConsoleVariableData<int>::GetValueOnGameThread() [c:\program files\epic games\ue_4.19\engine\source\runtime\core\public\hal\iconsolemanager.h:894]
    UE4Editor_PointGravity!UNinjaCharacterMovementComponent::ServerMoveHandleClientError() [d:\unreal projects\pointgravityroot\ue4\source\pointgravity\ninjacharactermovementcomponent.cpp:3394]
    UE4Editor_Engine!UCharacterMovementComponent::ServerMove_Implementation() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\components\charactermovementcomponent.cpp:8317]
    UE4Editor_Engine!UCharacterMovementComponent::ServerMoveDual_Implementation() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\components\charactermovementcomponent.cpp:7935]
    UE4Editor_Engine!ACharacter::execServerMoveDual() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\classes\gameframework\character.h:212]
    UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4551]
    UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1345]
    UE4Editor_Engine!AActor::ProcessEvent() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\actor.cpp:687]
    UE4Editor_Engine!FObjectReplicator::ReceivedRPC() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\datareplication.cpp:859]
    UE4Editor_Engine!FObjectReplicator::ReceivedBunch() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\datareplication.cpp:731]
    UE4Editor_Engine!UActorChannel::ProcessBunch() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:2281]
    UE4Editor_Engine!UActorChannel::ReceivedBunch() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:2148]
    UE4Editor_Engine!UChannel::ReceivedSequencedBunch() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:296]
    UE4Editor_Engine!UChannel::ReceivedNextBunch() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:667]
    UE4Editor_Engine!UChannel::ReceivedRawBunch() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:388]
    UE4Editor_Engine!UNetConnection::ReceivedPacket() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\netconnection.cpp:1540]
    UE4Editor_Engine!UNetConnection::ReceivedRawPacket() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\netconnection.cpp:933]
    UE4Editor_OnlineSubsystemUtils!UIpNetDriver::TickDispatch() [d:\build\++ue4+release-4.19+compile\sync\engine\plugins\online\onlinesubsystemutils\source\onlinesubsystemutils\private\ipnetdriver.cpp:237]
    UE4Editor_Engine!TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float)>::ExecuteIfSafe() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:659]
    UE4Editor_Engine!TBaseMulticastDelegate<void,float>::Broadcast() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:937]
    UE4Editor_Engine!UWorld::Tick() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1317]
    UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4+release-4.19+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1693]
    UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.19+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:401]
    UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3339]
    UE4Editor!GuardedMain() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
    UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
    UE4Editor!WinMain() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
    UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]

    Comment


      Nope, the problem I have occurs with control rotation and online mode, no crash.
      I remember there were crashes ages ago, but I'm not sure if they were related to what you mention.
      WreckMan: Rise of a Hero
      SonicGDK / Ashura: Dark Reign
      Heaven of Relics / Relic Madness

      Comment


        Originally posted by Xaklse View Post
        Nope, the problem I have occurs with control rotation and online mode, no crash.
        I remember there were crashes ages ago, but I'm not sure if they were related to what you mention.
        When I enable 'Ignore Client Movement Error Checks and Correction' in the movement component it seems to stop crashing. I guess those checks and corrections can't be used together with the altered gravity on the movement?

        thanks
        Frank

        Comment


          turns out that wasn't the culprit, still get the crashes.

          Comment


            Ninja Character plugin for Unreal Engine 4.19.2 is up! Go to >> https://github.com/Xaklse/UnrealEngine << and grab the ZIP file (not the green button) from the link posted at the top part (if error 404: log in to Github, link your UE4 account to Github).

            This is for C++-based game projects.

            And I didn't fix my online bug related to ControlRotation yet.
            WreckMan: Rise of a Hero
            SonicGDK / Ashura: Dark Reign
            Heaven of Relics / Relic Madness

            Comment


              Awesome, having a look now !
              LinkedIn | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP | 4.17.2 | 4.16.2 | 4.15.3 | 4.14.3

              Comment


                Originally posted by Xaklse View Post
                Ninja Character plugin for Unreal Engine 4.19.2 is up! Go to >> https://github.com/Xaklse/UnrealEngine << and grab the ZIP file (not the green button) from the link posted at the top part (if error 404: log in to Github, link your UE4 account to Github).

                This is for C++-based game projects.

                And I didn't fix my online bug related to ControlRotation yet.
                Xaklse, thanks for your work but your link does not work. Getting still 404. (i am logged in)
                I browsed your github repositories and there aren't any unreal releated projects. Perhaps it is configured to private? Don't know.
                Can you please post the zip in this thread?

                EDIT:
                Have you done something?
                I just saw that i got an email (after linking) that invited me for joining Epic Games organization on github.
                I see your repository now.
                If you haven't done anything so just linking the UE4 account to github doesn't give me access.
                I also have to join the epic games organization on github.
                Anyway it works now.
                Last edited by Ionpainter; 07-19-2018, 11:16 AM.

                Comment


                  Hey Xaklse

                  First of all, thanks for the update!

                  Got a few questions though:

                  - On a spherical world, I still get a gimbal lock with the spring arm. I used to fixed this by setting the absolute rotation on the spring arm, and have the control inputs add to that rotation (without using controller yaw/pitch nodes). However this needed quite a lot of extra math. I tried using the pawn from your example, however has the same result. Is this still needed to avoid gimbal lock?

                  - Setting gravity direction each tick (with only Align Component to Gravity enabled), makes the pawn rotate snappy (is custom direction evaluated each tick?). I tried interpolating the gravity direction, which didn't work either.

                  My previous setup completely ignored the control rotation. I first set the gravity direction each frame, then according to the gravity I set the actor rotation (using MakeRotFromXY), then set spring arm rotation, then capsule rotation. This all felt a bit like an overkill (cause there was also a lot of extra math needed for other mechanics like aiming and so on). So I was wondering if this is still needed with your update, or that I'm simply doing things wrong.

                  If this all sounds too trivial, please drop me a PM, so I can elaborate the issues I'm having!

                  Thanks!

                  Frank
                  Last edited by Frank Post; 07-19-2018, 06:17 PM.

                  Comment

                  Working...
                  X