Download

God Mode Player Character

Hi ,
I’m making a First Person VR Experience , I have two problems.

1- I want the Player Character’s Navigation be like the Default UE4 one . so the user can navigate anywhere in the world . (just like navigating in UE4 editor with RightClick+WASD) I searched but just found Fly mode for character and it’s not what I want to achieve .

2- I’m using Leap motion for Player Character (Getnamo’s Plugin) and I want to know how it’s possible to Connect Player Character’s Camera Rotation to Leap motion’s Hands . like when I look up (to the Sky) my hands would also come infront of me. because now I can just see my hands when facing down or below the horizon.

I wouldn’t recommend taking the approach in #2, as hand movements should always be driven by the user. It would probably feel very disorienting to have your hands move without you moving them.

As well, the Leap Motion Controller’s tracking FOV is wider than the visual FOV of the headset, but the tracking does drop out beyond certain angles. By having the hands displayed when they’re on the edge of the tracking FOV, it greatly increases the odds of tracking loss, which would be a really frustrating experience.

That makes sense! I havent tried Leap in VR yet so got no idea .

ps. I still Bump for my 1st Problem:D

For the spectator navigation you can change the default Pawn Class inside the GameMode or in the Editor (World Settings) to SpectatorPawn.

If you want to change its speed you must create a new BP class inherited from SpectatorPawn and change inside the SpectatorMovementComponent (actually it’s named MovementComponent only). Don’t forget to change the Default Pawn Class to the new custom spectator class, in this case.

Great! I think that’s gonna work . but just a little problem here. As you see below,I’m using Leap motion’s Player Character … so to achieve that Spectator navigation I have to replace this “Character Movement” component with a “Floating Pawn Movement” . but I just don’t know how to replace them, because the Character Movement as you see below is Inherited from C++ Character Class . Any Guides?!

6f7aaf1c78e9148a413b4b49b914310cfc2e8741.jpeg

Oh, I see. Try creating a Blueprint Class and search for the SpectatorPawn Class. This class will inherit the correct movement component. Try adding the LeapAnimBodyChildActor inside the components, I’m not sure if this will work correctly, but that’s my bet…

Try and tell me if it has worked.

Man I’m really having hard time solving that. I made the parent as you said (Spectator Pawn) and assigned everything from Leap Motion’s plugin the way it should be , but It’s just not working. I can’t basically control my hands.
I also tried Reparenting LeapCharacter from Character to Spectator Pawn. I asked the question in getnamo’s leap motion thread . hope to get an answer…

Well, I wish I had more knowledge about Leap Motion to help you with this one "/

Really hope you get your answer and post the solution here (:

EDIT*

Had an idea that can simulate the Spectator Movement in CaharacterMovement Component:

Go to your Project Settings and add the MoveUp Axis Input. Add ‘E’ and ‘Q’:

23872a1b238257ef3d459104d213aa9a252f0a4c.jpeg

Create a Character Class and add this to the movement:

After, change the Movement Mode in the Movement Component to Flying.

This may simulate the Spectator movement! Increase the Flying Speed to feel the difference.

I just did what you said , it works like an Spectator , but when I add Mouse Input to the character it acts weird and it’s far from correct ( moves diagonally )

This is my mouse input inside the CharacterBP :

Am I doing it wrong ?!

That one is easy, just need to add the Input Action LookUp:
b5ced3063af6adbfca9636c35e9465dab231557c.jpeg

a2c684703953a6693d01a3c17e2961cbdcbeb295.jpeg

You can tune up the “Friction” parameter inside the Calc Velocity; I set this value because it was the closest from the spectator movement I’ve got…

Wow Man! It works perfect … Just found the reason of it’s incorrect movement . in your screenshot you didn’t attach Roll <> Roll (I thought that was for a purpose) . I connected them and boom !
Thanks a million ! you just saved my life:D :cool:

Nice!

Right, it was on purpose, we don’t need the Roll in this case, I can imagine how strange it was for you to control the pawn, haha.

You’re welcome (: