VR Expansion Plugin

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

They are very different, the plugin uses a custom gripping system instead of attachment. If you want to use the standard controllers for drawers and the like then check out Mitches tutorials in forum section. Otherwise you would have to implement some of the gripping code that the template character uses.

I’ve found what I needed, thank you very very much for your support!

Best wishes

Andrea

Pushed a new commit to both the plugin and the template

Plugin Changes



**12/07/2016**
Added new grip type, Custom Grip, it does not perform any movement logic and sends an interface
event called TickGrip every tick with the motion controllers delta since last frame.

TickGrip can be enabled for ALL grip types as a boolean in the motion controller component if so wished but leave it off otherwise, interface calls have a slight perf hit.

Fixed a couple minor bugs

Change main tick function into a switch statement

Moved interface checks before all logic in tick and set booleans to prevent having to check
for the interface multiple times.

Deleted a ton of commented code in the motion controller that isn't going to be used
in the future.


Template Changes



**12/07/2016**
Fixed potion actor issue in stand alone where it wasn't welding the stopper correctly.

Fixed fps char not setting boolean to grip without motion controllers and assigned them hand enums.

Updated to latest plugin version with multiple bug fixes and the Custom grip type.


might be incredibly cheeky but any chance you could add a climbing mode to the template if you have the time. Even with the help you gave me its way above what I can do in Unreal and unless I can see the BP I have no hope of getting it to work. If you don’t have the time thats cool. You’re doing incredibly work for the VR community and I’m sure you have a list of priorities you need to get through that will benifit the community as a whole.