VR Expansion Plugin

its not a “crash” per say, its an assertion thrown by the engine (something was checked to “ensure” it is valid and was found to not be).

In case it is: check(NewMass > 0.f);

The engine tried to calculate a mass for the object and couldn’t get a valid one (not a positive number) and asserted out with a warning.

is very unlikely to be a bug with the plugin and more likely to be a issue with your objects physics setup, negative mass scaling, setting it to 0 mass somehow (boverride clamps it to a min so it shouldn’t happen there).

I’ll still run some checks just in case it is my setup doing it, but its unlikely to be involved.

Edit Yeah its not the plugin, its what can happen when trying to simulate a trimesh collision body


I'm afraid  is a (sensible) limitation of the physics engine. It does not supporting using a triangle mesh as the collision for a dynamic object, it would be very expensive, and is hard to calculate mass properties for etc.

more ▼

answered **Apr 22 '15 at 6:05 AM**

https:\/\/secure.gravatar.com\/avatar\/cb0264335bad95ce50287e10be6b1930?d=identicon

[JamesG](https://answers.unrealengine.com/users/98/jamesg.html)STAFF
1.3k ● 8 ● 5 ● 31


I tried to get an out for it by checking for valid body instance but it still counts as valid with that enabled. I’ll add my own ensure to warn and prevent people from trying to physically pick up a complex as simple body.

Yeah, that’s it. With simple collision works perfectly :slight_smile:

Hi, I got the latest plugin version so I had the netsmoother, it’s working really well on “launch project”, but after packaging I’m getting error on open:

“Missing Dependency, request for NetSmoother but it hasn’t been created yet”

Could you try re-building out of visual studio for the version you are using and then packaging in editor? Feel like its a mismatch between the editor and your package. That normally happens with non default objects but object is entirely default.

I have packaged and ran several times since adding that in with no issues, but I tend to re-build binaries and intermediates very often.

Edit I did have netsmoother below the objects that attach to it in the class structure though, I could conceive of a situation where when serializing it gets to that last so the ones attached to it have issues. I re-ordered it and committed.

Pushed a new commit to the plugin repository today



 Added Epics world locked implementation as an option to the VRStereoWidgets  
 They are still buggy, but should be included anyway  

 Added check to ensure that we don't try to physically pick up an object that is using  
 bUseComplexAsSimple collision.  

  will be more obvious as to why it is crashing out that the default Mass > 0.f  
 warning that is generated normally.  

 Moved netsmoother up higher in serialization.  

 Exposed levers bIsLerping to blueprint so things can use it (see new native lever actor  
 and how it checks it to turn off tick). 

Edit Packaged and pushed live new pre-built binaries

Hi what code would I need to put into my character if I just wanted to be able to work with the VRGrip interface, so if I just wanted to be able to open a drawer of door?

The gripping logic is ran through the GripMotionControllers.

GripObjectByInterface and DropObjectByInterface mostly.

I run a backend in c++, but leave the front end and actual logic of when to grip and drop up to the end user to retain the most flexibility.

Hi ,

Thank you for the quick fix, but we are still getting the error :frowning:

We are running binary engine and a non-c++ project. It runs the game in editor fine, but if we build for windows no editor, launching the game still gives us error :

[2017.10.23-13.25.48:215] 0]LogWindows: Error: Fatal error: [File:\Build++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 3004]
[2017.10.23-13.25.48:215] 0]LogWindows: Error: Missing Dependency, request for NetSmoother but it hasn’t been created yet.

Is he not building the netsmoother on package? Any clues on what we should try?

Thank you

We just rebuild everything and it’s now working! I think the issue was that we were doing iterative cooking and he didn’t detect the change in the plugin :-). We did a full build and it’s working now!

Thank you!

Do you mean all logic needs to be copied over to my player because if it does it leaves a load of errors and some BP’s don’t copy over properly.

No, Only if you want the exact same logic as the template has, the template is a very very generic implementation. It is made so that you can do just about everything with it so parts of it are far more complex than most would require (it is also multiplayer enabled which adds significant code base to it).

Simple gripping is literally tracing or overlapping for an object, and then calling GripObjectByInterface from the motion controller with it passed in. You don’t need all of the button mapping or special functions that the template implements unless you really want them.

The basic “grip logic” is below, drawers can use the VRSliderComponent instead though and you wouldn’t even need the “Convert to controller relative transform” node.

https://i.imgur.com/wpa1fiW.png

Nearest Component is just an example, you can pass Actors OR Components in to it, it doesn’t care.

I really need to make a “back to basics” video for how to do the simple things with the plugin, but I have been very low on time recently.

Going over 4.18 changes

Hi,

First, thanks so much for awesome tool!

I have visualization project where I need to dynamically change the camera height, from a child perspective, to adult man, woman etc. Is there a preferred way of doing ? I’m a bit new to Unreal and whenever I think I found a solution the camera resets back to default. I don’t need to change the capsule in anyway, just offset the camera Z (and have it keep that value thru teleportation etc).

Thanks in advance!

​​​​​​​//Adam

Bit of a noobish question…

I’ve got a rift with touch controllers, How would I use the other buttons on my touch controller in the gun example.
So what if I would like to press the B button on my right controller to reload or something.

Thanks a lot!

You don’t really want to change the camera “height”, it would feel like you are standing with your chest at the floor then, what you want to do is change the “WorldScale” and then scale the mesh components as well downwards by the same amount. In 4.16 Epic made multiple changes to the tracked devices so that their tracked positions account for worldscale correctly now, so you should be able to use it without issue.

Now as to how the full blown character performs downscaled? I haven’t tested that in awhile, if you run into issues please let me know as I would like to fully support it.

You’ll have to bind to the button and pass in events to the held object. I support two default interface inputs (OnUse and OnSecondaryUse) but don’t expand further than that (I wanted to make it a generic OnAction passing in a byte code but got resistance to it). If you need more than those two communicative events then its kind of up to you currently to provide them to the object.

I’m trying to reduce plugin bloat so I don’t really want to add yet another interface event in without removing something else.

Edit…actually, I think I might go ahead and add that and mark the other two for eventual depreciation, i’m doing some interface changes in 4.18 anyway, it was long past due.

Hey man, I’d like to thank you again for awesome plugin and your time to help people out. We are currently working on our very first game and your plugin has been a huge help. When we’re ready to announce our game later next month I’ll let you know so you can add it to the list in your OP.

sounds good.

Pushed 4.18 live to the template and plugin repository, locked the 4.17 branches away, I am building pre-compiled binaries now and will link to them when finished.



**4.18 additions**

Moved secondary grip scaler into a new struct (AdvSecondaryGripSettings) along with several new features

Added the 1 Euro Low Pass Filter that Epic has been using in the VR Editor for the laser beams as a native part of the plugin in both BP and c++.

Secondary grip scaler now uses the 1 Euro Low Pass Filter on the back end to control the secondary grip smoothing(settings are now in project settings for
the 1 Euro Low Pass that  uses).

Add a Distance base influence option in the AdvSecondaryGripSettings, when the boolean is true it uses the combined values of the DistanceInfluenceDeadZone and DistanceInfluenceDistanceToZero to control how much effect the secondary hand has over the grip (see latest video for explanation).

Added GripDistance and SecondaryGripDistance floats to the grip struct, they are calculated locally and are not replicated.

Improved NetSerialization in general.

For generic objects without all of the advanced new features, they should still be less overall replication cost, obviously replication cost will ramp up as more and more of the advanced settings are enabled.

BUGFIX: Added in an UpdateComponentToWorld call on object drop to account for an issue with the new Late update that Epic is using.

Added a global settings class that shows up in ProjectSettings|VRExpansionPlugin so that I can expose global variables there cleanly, I intend to move some magic numbers out of their classes and into that in the future, currently only has the 1 Euro settings for the motion controllers.


**4.18 interface changes & migration guide**

AdvancedPhysicsSettings() interface function removed

Added AdvancedGripSettings() interface function so that the interface can return advanced physics AND secondarygrip settings.


GripStiffness() and GripDamping() interface functions removed

Added GetGripStiffnessAndDamping() function to replace them


SlotGripType() and FreeGripType() interface functions removed

Added GetPrimaryGripType(bool bIsSlot) to replace them


ClosestSecondarySlotInRange() and ClosestPrimarySlotInRange() Interface functions removed

Added ClosestGripSlotInRange() which takes a bool bSecondaryGrip so that it is a single function definition now instead of two

*** REQUIRES BLUEPRINT CHANGES* **You will need to replace your Closest Primary slot and Closest Secondary slot nodes with a ClosestGripSlotInRange node
with the correct bSecondaryGrip setting. The template has already been updated to make  change.


Added OnInput(FKey, EInputEvent) event to the interface so that you can pass in any generic input you want to the gripped object instead of just
OnUsed and OnEndUsed (and secondary).


Apex destructon auto detection of held object being destroyed has been removed,  is due to them moving Apex into its own plugin
and disabling it by default.


**Anywhere you were manually overriding one of the removed interface functions you will need to correct for the changes.**



I’m getting error when trying to build from Visual Studio, something about the WheeledVehicle? Do you know whats going wrong here?

I’m getting the same UBT error using the pre-built package for 4.18

2>ERROR : UBT error : Failed to produce item: D:\Git\TheCaper\Plugins\VRExpansionPlugin\OpenVRExpansionPlugin\Binaries\Win64\UE4Editor-OpenVRExpansionPlugin.pdb