VR Expansion Plugin

Thanks for your reply. I’m running a setup where my VR characters upper body is IK driven, and the lower body is animation driven for room scale. Of course I’m interested in the plugin to avoid the double transform on the child camera issue that we have with Epic’s normal character setup for room scale, but also to get around issue where the animation portion of my setup wants to correct back to the actor/capsule location. I’m currently getting around with relative transforms on my skeletal mesh, but it ends up giving me a pretty floaty looking result. I’m fairly new at , and not actually sure whether animation is positioned according to the actor location, or if it’s positioning based on the capsule location. If the capsule location has nothing to do with the animation positioning then the SimpleVRCharacter does sounds like the better way to go, but I really need the animation positioning to come along for the ride so would go with VRCharacter if positioning is at all capsule based. I don’t really care about the Capsule collision for actual collision in my game, and can just make a separate capsule for collision if the root capsule doesn’t play a part in the positioning of the animation. Just wanting to double checking before I start, as it’ll be a bunch of work to migrate everything to test.

Thanks again!

The simple character will keep the capsule and head together in world space on the X/Y axis’s, the VRCharacter moves the representation of the capsules collision with the HMD but not the actor/capsule itself.

Also capsule location is the same as actor location when it is the root component, and you can’t just “add” a capsule for collision to a pawn, only the root component is used for pawn collision unless you manually sweep or are talking about just physics interactions.

That being said, if you don’t want world collision then why bother using one of these characters, you could use my Parent Relative Attachment instead and attach the mesh to it. It would follow the HMD and character around for you and face forward with the camera (or make something like it in BP).

Looks like I spoke without thinking the capsule collision bit through last night. Maybe I was angry at my capsule. I will need that for blocking static objects and overlapping dynamic ones, and probably for a lot of other reasons I don’t know about. Thanks for clarifying about root component, and collision. From what you’ve said, it does sound like I’ll have what I need with SimpleVRCharacter and also need the Replication. Will give it a go today. Thanks again.

Does work for 4.14?

Hey ,

Have another question if you have a sec.

I am starting the game with your VRCharacter, then possessing a pawn in which I reset the VR using “Set Tracking Origin” (Set to Floor Level) and “Reset Orientation and Position” (Default settings).

Things are fine until I try to go back to possessing a new VRCharacter…when I do the camera falls down to the floor.

Is there any way to get the VRCharacter camera back to the way it was before the pawn possess?

Thanks!

Set the cameras relative location to the height it was before unpossessing. It takes the last HMD location when unpossessing so will fall to zero when it gets a bad value. When there is no owning pawn it uses the cameras relative location instead.

Hi how hard would it be to implement a climbing system with plugin. I thought it would be as simple as grabbing onto a grabbable object that was locked in the x,y,z axis and just pull myself up (Bring myself to it rather than it to me was my thinking) but that doesn’t work and I guess it was never going to be that simple. Is there an easy way to be able to climb using the controllers or is it much more complicated than that?

Either use flight movement or a custom movement mode, it would work just like normal characters except with the controllers are input. Would be significantly easier to get working with the new Simple character I assume.

Do you mean a flight and custom movement like .


How would you use the controllers as an input instead of a key press and only work when you grab certain objects (Like a ledge)?

Edit: Thinking about it more I guess I could trigger the flying movement mode when the controller overlaps with say the wall but I would be stuck on how i could get the up and down movement to work when I physically try to move the motion controller up or down.

Tried setting relative height once before and then once after spawning new VRCharacter but both still fall down to zero. If I turn off “Lock to HMD” it stays at the relative location but once it is turned back on it drops again to zero. :frowning:

Am I missing a step?

Track where you start gripping at, move the character the difference vertically until release.

Is there a valid tracking HMD? I don’t replicate the cameras location unless it is possessed but the default Epic camera transform code always uses the HMD location as long as one is connected if LockToHMD is true. Reset Orientation and Position shouldn’t be necessary though, that is for eye level tracking to attain an initial location, for room space you don’t use that.

That’s not what I’m trying to do though. I don’t want to pull the trigger when I have a lock and the character to start moving vertically. What I want to do is with my real hand pull down the motion controller and my character in the game world will go up. So I need something to tell the game I am moving my hand/controller down. That’s the bit I’m stuck on.

Kind of like

I have to go in and change the HMD setting to 0 in FPSViveCharacter, i wish there was a way to detect whether you are starting in “play” or “play VR” in UE4.
Any ideas? gets a bit irritating to do if you are switching between 2d / VR a lot.

Thats the same thing… However you define a “grip” for climbing (trigger or overlap), once it begins you track the hand in world space and apply the offset from the start to the player. I would suggest that if you don’t want trigger that you at least have something to hold to climb though, doing it by overlap could cause unwanted vertical movement when moving arms.

IE:
Controller overlaps climbing rung
hold trigger > set climbing mode > record controller position
OnTick > if in climbing mode > get controller difference from last position > apply as offset to character > record new position
trigger release > end climbing mode

I unlink the “ReturnHMD” boolean in the playercontroller when I want to work in 2d so that it automatically spawns me a FPS pawn even if I have a headset plugged in.

Cool I’ll try that. I know was off topic as it’s not really related to your plugin so thanks.

That’s what i do too, but if there’s a single node to replace doing that manually all the time then that would be quite nice? :slight_smile:

Is Pickup Actor Interface broken? The reason i’m asking is because I cant get either “Event Drop” or “Event Pickup” to fire inside the BP. I have only tried using the FPSViveCharacter, but i dont think not using the native ViveCharacter is the problem because it’s calling the function directly on the ViveCharacter and I can see that when i pickup i trace all the way through to Try Grab Server on Vive Pawn Character in the ViveCharacter BP. Would be awesome if you could help me figure out what goes wrong because I’m stuck :

Hi ,

I appreciate so much your work, thank you for sharing it with us. I’m quite a noob with blueprints, a total inept with coding… I’m trying to export just the door’s and the drawer’s actors from your template to one of my projects, but just migrating those assets just won’t work, would you be so kind to show me how to make them work in a standard UE4 VR Template?

Thank you

Andrea

I don’t use the pickup interface from the Epic template, I have a VRGripInterface in the plugin that I use instead that manages a lot more information than the one that the Epic template has. You can hook up the epic OnPickup / OnDrop messages in the gripping code after the successful drop/grip functions if you want.

The VRGrip interface has events for child components being gripped as well as events for the object itself. It helps in instances where you are gripping just a component but want to run logic on the parent actor when it happens, it still fires them down to the component though.

Epics pickup system uses attachment directly, if you still want attachment as well you can branch before the plugin code and insert a check for their interface and use different pickup logic there.

You’ll need the plugin for them to migrate, they rely on some of the events from it. If you want objects of the like that don’t need the plugin than you should check out Mitches examples in forum section.

I took a few days off as I was really busy and wanted to actually get sleep during the period, I will return to working on the plugin either today or tomorrow.

I’ll be adding a “Custom” grip mode where it adds to the controller array and manages late updates but leaves the movement logic up to the gripped object itself and a GripTick() event that passes in the delta time and the positional difference of the owning controller from the last tick to the gripped object (for the custom grip movement or for logic to be performed based on positional difference for the other grips).

Those two things should make “climbing” systems or custom coded grips a lot easier (in essence it is a “null” grip for any logic that the plugin doesn’t directly handle).

Hi ,

thank you for your answer, I just figured out by myself :slight_smile:

now I have my project, created in the Epic’s VR Template environment, with your plugin enabled. I migrated the Drawer actor and the Door actor into my scene, but I’m not able to open/close them with
my MotionControllers (standard VR Template’s MotionControllers). I guess is because the “take objects” interactions in the Epic’s template works with the “PickUpActor” interface, while in yours depends on the “VRGrip” interface, am I wrong?

I apologize for superficially speaking about blueprints and coding, I’m just an artist trying to make things work. :@

So, what would you recommend to make me interact with your drawer in my environment? Should I replace the Epic’s MotionController_BP with yours? Are they different?

Thank you!

Andrea