Ninja Character - Dynamic gravity for characters & objects

Im’getting this error

i see a lot of function on the ninja category, where is the documentation, i need to learn what they do

You need to cast to your player actor to get its ninjacharactermovement component, and plug that into the target input in the function from your screenshot

From inside your player blueprint you dont need to cast first, but there should be a get ninjamovementcomponent node you can directly use

i can’t find that node, i unchecked “Context Sensitive” but nothing, only node i found is cast to NinjaMovementComponent, i plugged the character movement component
but it doesn’t work, i don’t know what the problems is, i’m gonna DM you, if you don’t mind.

it worked, i’ve put an actor with sphere collision, on BeginOverlap i call an interface on the character and set the center of the planet as the gravity center,
i spawned my characters to the side of the planet, they align immediately and fall directly down towards the center of the planet,
the only issue is with second player, the camera doesnt rotation, and keeps the original orientation, i’ll try to come up with something.
i need to learn more, i hope you’ll help me guys and benefit from my experience at the same time.

I reviewed all possible settings in all components. The only thing I could do to fix the situation was to add an automatic change of the controller angle if it does not match the angle of the capsule of the character. But unfortunately this caused another problem, when you try to direct the camera to the original top or bottom, it starts to rotate in a random direction.

Hey :slight_smile: i cant find the “NinjaCharacter Content” ordner in my content browser

Unfortunately it isn’t a good idea to try to correct rotations with pitch-yaw-roll (in general) when you’re dealing with arbitrary orientations. I don’t see any wrong configurations there; make sure you’re using a NinjaPlayerCameraManager, check your level actor list while playing.

.

Did you follow the instructions step by step? Is the plugin is enabled? Can you create a NinjaCharacter blueprint?

Curious if anyone using Ninja Character Plugin with Advanced Locomotion System v4? If YES, did you get the multi-directional gravity to work?

@Xaklse

First of all, this is a great plugin! I’ve been working with it for the past couple of weeks and I found it flexible to get most of the logic I needed.
But I’ve encountered a couple of issues I’ve been struggling to get sorted. I’d appreciate if you could provide any advice.

First issue is the character aim offset.
It works fine when the character is on the default gravity direction. But once I shift the gravity by 90 degrees(On Y axis), the the aim offset animation doesn’t adapt to the rotational change and still works along the default gravity direction. I change the gravity direction with “Set Fixed Gravity Direction” Node.

Below is an example how the pitch/yaw is found in the animation blueprint.


https://forums.unrealengine.com/core/image/gif;base64

Also how it’s used in the aim offset

I am using the free Paragon Character asset to test this also. The Camera Management Class is setup to be NinjaPlayerCameraManager. Double checked that.

The second issue is that I’m going for a First Person Shooter and have it attached to the character’s head. As I found the only way to do a smooth camera rotation transition when fixed direction is changed is by using the Spring Arm and using the timeline for the camera rotation lag speed.

But using the Spring Arm as first person causes issues (for example when looking around), the camera rotates around the start point of the spring arm and it goes inside the character mesh, etc. (The Spring Arm length is set to 0 but the camera still has a tilt on bigger angles.)

So my question is if there is another way to have smooth camera rotation while changing characters gravity direction without using the spring arm?

Thanks a lot.

Hello, I’m experiencing a recurring issue where the Player Camera Manager seemingly randomly ceases to accept an input for which manager it needs to use, defaulting to the base PlayerCameraManager. I can’t nail down exactly what is causing this but it’s unrelated to my project settings or any of my assets/blueprints, which leads me to believe that it might have something to do with the plugin itself.
My C++ skills are nonexistent so I’m unable to hunt down the source of the problem myself. Is there any chance you have some insight in to what is going on?

Up until now my solution has been to simply create an entirely new project and migrate all my work over to that however this is obviously a little tedious.

aiming:

I created the following for our game. Our yaw is inherited from the controller yaw, so I don’t need that. I’m using the resulting pitch output to drive a Transform Modify bone node (rotation), set to additive in component space (therefor using an inverse transform rotation to get it from Worldspace to local space).

To get smooth camera behaviour you could try something like this (triggered by event tick):

I tried the smooth camera above with the camera spring arm as the target for set world rotation but it isn’t working for me, I made a game with the camera lag and rotation lag method but it feels sluggish and still has a bit of the camera snap that made a few of the players nauseous. If you would like to try it out: Untitled Gravity Game Demo by Erros, all I really need to know is where the immediate camera rotation set is in the c++ code so I can have a crack at changing it. I tried updating OnCharMovementAxisChanged but that didn’t seem to work. Thanks for the great plugin!

Did anyone integrated this with the Survival game kit character? Please let me know. I’m having issues with movements in y axis and camera.

Sorry @DeadbeatW, I’m too rusty with aiming and first person view, I can’t help you there, try FrankPost’s solution/suggestions.

.

?!?! That’s very weird; if you’re sure it isn’t related to your game blueprints, then it looks like an engine bug. My NinjaPlayerCameraManager is very simple/short, and it’s use is optional, meaning that no other Ninja code uses it or depends on it.

.

I played the game, the camera isn’t good there as you said. If you’re asking about where the spring arm updates the camera rotation in C++, the update happens in USpringArmComponent::UpdateDesiredArmLocation. For your game I would calculate the camera rotation UP axis from the imaginary line that passes through the center of your hollow world and the center of the bottom collision sphere of the character.

I think what is happening is as soon as the character walks onto a new plane and their normal is updated and since the spring is attached, the spring arm keeps that relative angle it had before the update but the jump from the camera’s previous position to the new position is drastic and that’s what’s causing the issue so I’m guessing the solution is to write a custom camera actor to follow the actor. I was under the impression that your camera manager was the reason but it seems it is just a default behavior of ue4’s spring arm.

New version submitted, compatible with UE 4.26, to be approved in the coming hours/days.

1.14.26:

  • Cleanup of unneeded SupportedPrograms section in .uplugin file.
  • Fixed ComputeGroundMovementDeltaEx function to allow no delta movement offset to avoid assert/crash.
  • Improved crouch offset support for attached skeletal mesh component in NinjaCharacter.
    — Mesh crouch offset works properly if using absolute world position (happens with smooth interpolation).
  • Disallowed smooth interpolation of attached skeletal mesh component in remotely controlled NinjaCharacters.
  • Added SmoothComponentLocation/SmoothComponentRotation Blueprint callable functions to NinjaCharacter.
  • Simplified Blueprint graph of NinjaDumbCharacter05_BP example.
    — No need to cache initial relative location and rotation for the attached skeletal mesh component.

@Xaklse I’m also using this for a first person project just like @MOPDOP And I’ve ran into same issues. The camera manager is correct and the camera boom is configured correctly. Can’t find the problem anywhere.

so nobody has ever been able to make this work for multiplayer?

I created a game project that uses the UE4’s FirstPerson blueprint template and my plugin, let me know if it works for you.
FirstPersonNinja (4.26)