VR Expansion Plugin

Hi again ! I have been trying to switch a pawn from being a child of VRCharacter to being a child of VRSimpleCharacter.

The one issue I have is the components (VRSceneComponent, VRReplicatedCamera, etc) are not parented to each other correctly after the switch. it is not possible to reorder them.
Would be fixed if I tried to specify attachments in the VRSimpleCharacter class? I saw a thread with a similar issue:
https://answers.unrealengine.com/questions/244955/reordering-inherited-components.html
Appreciate any pointers!

Thank you very much morendral.

Mmmm, I went in and based the two characters on the same BaseVRCharacter awhile back to make it easier to do just (so I could make BP for VRCharacter and just copy as Simple to save me time). However it does throw an assert in code (about parent relationships) that I just ignore since I run from Visual Studio that may be blocking you attempting to do the same thing in just the editor.

Open visual studio, change the top from Development With Editor to Debug With Editor, press f5, wait for the editor to load, re-parent the BP class again and when it asserts hit continue in the popup box. The conversion should work fine, its just being overzealous about it.

I’ll note though, that if you are doing to save time with AI dealing with player location (I assume that is the problem?) that its probably not actually worth it. Simple character is missing the walking override that you may want and the neck offset, it also isn’t currently rotating the base character only translating it. There are ways around AI by using an aim location offset by the capsule for instance.

Even RoboRecall is checking if the aimed target is a VR character and if so is using the camera location instead of actor location, some times casting is fairly necessary.

Edit I will also note that the VRCharacter “Should” be returning the correct location for pathing too, its target point is overridden in the code.

Edit2 Should I make a custom AI Controller to handle the VRCharacters? It would be really easy to do and could just be set as the controller for AI then and it would handle my VRCharacters and SimpleVRCharacters natively then.

Edit3 Don’t want more posts - Already made a custom AI Controller that checks for VR characters and adjusts facing rotation and line of sight to checks. Can’t find anything else in there that really needs an override.

An option to toggle the quantization level would be great to have. Thanks for pointing me to the replication speed setting and smoothing. I hadn’t seen those. I switched to 50 hz plus smoothing and that was enough to fix the network hitching I was seeing client side with my testing setup of just two players with 3 trackers each. Smoothing wasn’t noticeable. The extreme mode sounds interesting. Curious what you would plan on using there?

Hi there!
I’m trying to make a rifle that i can hold with two hands. But sadly there are 2 problems. (and I’m using the example template.) Can you help me out? :slight_smile:

First problem is when I want to let go of the rifle’s forend (‘VRGripS1’) by releasing the grip button, I still have to toggle the grip button by pressing again. (real problem is ‘VRGripP1’ - which is the rifle’s grip - I managed to make it possible to drop it by just releasing the grip button. So where in the Vive_PawnCharacter blueprint should I look at?)

Second problem is when I let go of the forend (‘VRGripS1’), my character drops the whole rifle when I want to still grab it by the forend.

I’m still struggling to figure out how to make reloading mechanism but I’ll try to work on that myself as much I can.
I’d be so appreciated if you could help me!

Dude, you are seriously insane. You already made a custom AI controller? That’s awesome! Yes, the only reason I was trying to switch to simplecharacter was for the AI. I’d just thought it would be easier (for me), and maybe more performant, than trying to get the AIController to set the real VR transform of the player all the time. Really appreciate the reply with the insight and suggestions, let alone the idea of a custom AIController. I have been using AIBehaviorToolkit (Marketplace AI state chaining system) for my game prototype and the toolkit AI has worked great with SimpleCharacter. I will stick to VRCharacter and press on!

Pushed a new commit to the plugin, 4.16 preview is now out, so besides some minor refactoring of the (unfinished) TrackedDeviceParent stuff I intend to get it ported over to that tomorrow.


Finished Replication overhaul for motion controllers / camera. Now has two selectable levels of
quantization at the cost a 1 bit due to replicating which option selected.

Default quant level is rounded to 2 Decimals.

Added VRAIController, can be the base of an AI controller for a pawn. Overrides the Line of Sight To and GetActorFocalPoint functions so that
if it is acting on a VRBaseCharacter it will use the HMD offset location instead of root.

I ended up only setting two levels for selection, I tried the extreme mode and it managed to save slightly more, but barely, and at the cost of a second additional bit on the other two levels. Quantization already scales how many bits are replicated based on the size of the number being replicated so at the relatively low numeric values that you will see in relative positions its difficult to get much more of a savings.

When the primary hand drops the weapon you want to to check if there is a secondary grip on it, if so, call a grip on that hand at its current location, then when the primary goes back into position you can flip it back again. Secondary grips are not full grips, they are just components that are tracked, when the primary grip is ended it also kills the secondary portion of it. Primary grips contain the information for the secondary within them.

allows for a pretty flexible system but takes some planning depending on how you want to setup your interactions.

From the sounds of it, you are actually approaching things backwards from how I set it up in the template though, you are considering the front grip the primary and the back grip the secondary, if you just renamed the sockets it would solve that for you.

Hi.
I can’t change rotation on Vive_character teleporting.
Actor -> teleport and setWorldRotation keep default rotation. Can you help me? Maybe one overrides somewhere?
(sorry for my bad English)

I am stupid. Sorry.
I find function RotateCharacter. (GetController -> SetControlRotation solve my problem)

Sorry, back again. Is there a way to do via blueprint? I found a “Set VRClimbing Step Height” and linked it to the Vive_PawnCharacter VRMovementReference, but it doesn’t seem to do anything?

If you are doing multiplayer, the server and the client have to have the same setting for .

You can directly go in to the movement component properties and set it to 0.0.

Edit It uses the default step up function from the character movement component, so it should fail out on 0.0f values.

Thanks! I enabled collision on the desk w/ drawers, and i still have weird pop-up thing where if im standing against the desk and rotate myself 180 degrees ill now be standing on the desk. happens with everything waist height or lower. I can probably live with it by making my objects taller though.

EDIT waist height in the first person test mode. About knee height while actually using the vive.

Oh are you talking about non climbing?

Thats the normal character movement step up height variable then. The VRClimbingStepUpHeight is seperate so that you can have a different value when climbing than when walking.

i changed the normal step up value awhile ago, and it made it so I can’t walk forwards and get bumped up on top of something, but i can still turn myself and end up on top of ledges and stuff ;D

Mmmm, how far back do you have the capsule offset? I may have to take rotation into account for relative collision as well

the capsule offset is currently -8,0,0. I don’t think I’ve changed it from the default.

Actually wait, did you mean you REMOVED collision from the desk / drawers? As in are you using the bWalkingCollisionOverride?

There is some popup to do with that when finding the floor, I should track it down. But otherwise I can’t replicate what you are talking about.

i turned the collision on the desk to block so i could jump on top of it.

I can make the same behavior occur by taking a standard cube actor and changing the scale to 0.6, 0.6, 0.6 and placing it on the floor. Then playing without a Vive, just First Person using the engine, if i walk up against that cube and rotate using the mouse, I pop up on top of it. It happens in VR too, but the cube has to be way smaller so its not a big deal at all.

Was first person using a standard pawn or a first person version of my pawn?

FPSVive_PawnCharacter