Announcement

Collapse
No announcement yet.

Dynamic gravity for characters

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

  • replied
    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 wonder if I'm missing something? This is a fresh project with your plugin and TP Content installed.

    If it helps at all, I'm noticing that the root Actor seems to be moving appropriately; it's only the actors skeletal mesh component that is jittering all over the place (also the transform of the skeletal mesh is showing X/Y/Z values going all over the place).

    Let me know if I can provide any further information. Video below:



    Thanks!

    Leave a comment:


  • replied
    Hello, zaguarman how do you ask for developper group ? I cannot access the files, 404 error for me too, so can you tell me where to ask ? I would really love to get this plugin and start tweaking and modifying it ! It look awesome Xaklse ! Thanks a lot for sharing this wonderfull work, really !

    Leave a comment:


  • replied
    Thank you Frank, the fixes are valid and should help others work.

    Leave a comment:


  • replied
    for whoever is using 4.24, a quick fix below:

    CharacterMovementComponent.h
    line 1728:

    Code:
    virtual void VisualizeMovement() const;
    change to:

    Code:
    virtual float VisualizeMovement() const;
    NinjaCharacterMovementComponent.cpp

    line 3421:

    Code:
    void UNinjaCharacterMovementComponent::VisualizeMovement() const
    {
    if (CharacterOwner == nullptr)
    {
    return;
    }
    change to:

    Code:
    float UNinjaCharacterMovementComponent::VisualizeMovement() const
    {
    if (CharacterOwner == nullptr)
    {
    return 0.0f;
    }
    add a return below line 3505:

    Code:
    #endif // !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
    return HeightOffset;
    }

    cheers
    Frank

    Leave a comment:


  • replied
    Hey Xaklse! Thank you for the continued support of this project, this work is awesome!
    As to your query, I think I tried it out but decided to go with my own. I have some plans for some other things I want the camera to do.
    And, uh, well, I did also run into another problem, in that while the character is inverted w/ respect to World-Z, I found that my control scheme was still inverted (re: turn camera to the left, it goes right; turn camera to the right, it goes left), and for what I'm working on I need it to remain consistent regardless of orientation.

    Leave a comment:


  • replied
    Well... why not use the provided NinjaPlayerCameraManager that fixes the problem?

    Leave a comment:


  • replied
    Hey there, just started messing around with the codebase and I've been running into the some of the same issues with the Control Rotation. Fairly certain the entire control orientation flips upside down (well, definitely flips, not necessarily completely upside down) as soon as the orientation of the character passes 90 degrees off of regular World-Z.

    Re: Control-Up becomes Control-Right.
    Control-Right becomes Control-Down.

    Edit:
    I've gone through a couple of different iterations of directly setting the Control Rotation to have the same values as my capsule rotation in the update tick, and I am pretty convinced that it is being reset to something else after that point. It's strange though, because I've tried just modifying the roll to compensate for the apparent error, offsetting the rotation by 90 degrees, but it just refuses to let the up vector for the control rotation be World down. What's more, I can't directly offset the roll to arbitrary values (re: 45, 37, 12, etc...) but some of the multiple-of-90 rotations DO rotate the frame (while we're upside down), just never to the desired orientation. More experimentation to follow.

    Right now the most likely culprit is the UpdateRotation call in the base PlayerController.

    Edit:
    Alright, figured it out (for the most part), and I was close.
    It was the ProcessViewRotation call from the PlayerCameraManager in the UpdateRotation call, specifically, these:

    Code:
        // PlayerCameraManager.cpp : 1124-1130
        else
        {
            // Limit Player View Axes
            LimitViewPitch( OutViewRotation, ViewPitchMin, ViewPitchMax );
            LimitViewYaw( OutViewRotation, ViewYawMin, ViewYawMax );
            LimitViewRoll( OutViewRotation, ViewRollMin, ViewRollMax );
        }
    In the default player camera manager, the control rotation values for pitch, yaw, and roll are capped to [-90,90], [0,360], and [-90,90], respectively, and this gets called every update tick. So, once I commented out these calls, I was able to directly update the control rotation to whatever I wanted. I might go back and fix it up a little better s.t. I don't need to reassign the control rotation every tick (or just change the limits in my camera manager), but at the very least I've got it working for my purposes right now. It's still pretty hacky.
    Last edited by AlbatrossofTime; 11-09-2019, 07:02 PM.

    Leave a comment:


  • replied
    Originally posted by CaioFelipe View Post
    That´s a project of dynamic gravity I am working on...
    How did you get the player camera to work like that?

    Leave a comment:


  • replied


    How can I rotate character in air when I want?(without set gravity direction)

    I found it... Disable 'Align Component to Gravity', then I can rotate character with things like 'AddActorWorldRotation'.
    Last edited by jic6012; 05-19-2019, 01:22 AM.

    Leave a comment:


  • replied
    I've never used this type of plug in, what should I do with this files I've dowloaded?

    Leave a comment:


  • replied
    I connected the accounts but still 404

    Leave a comment:


  • replied
    Hi, I have my Unreal account connected to Github and still getting the 404 error. Does somebody how to fix this?


    Edit: An Epic Team Admin added me to the Developers group and now works. Thanks bro!
    Last edited by zaguarman; 04-09-2019, 03:16 PM.

    Leave a comment:


  • replied
    Hey Xaklse, I'm interested in your code but I can't find it on Github. I connected my accounts, but to no avail. Has it been moved or deleted?

    Originally posted by Xaklse View Post
    Then I suggest you contact an administrator or moderator and ask for help regarding this matter.
    Links are online.
    Anyone have the links working?
    Last edited by Timothy LeBlanc; 03-19-2019, 02:33 PM.

    Leave a comment:


  • replied
    Then I suggest you contact an administrator or moderator and ask for help regarding this matter.
    Links are online.

    Leave a comment:


  • replied
    Originally posted by Xaklse View Post
    If you get error 404: log in to Github, and link your UE4 account to Github. Let me know if it works.
    Hi, I'm interesting in your code, I try do something similar without luck. For me, not work your repoditory, 404 error, I can't download. I allready link Github to UE account, but no work. You have erase the content?.

    Leave a comment:

Working...
X