VR Expansion Plugin Documentation

3.2.Gripping Tips


If this is set to true (engine default) then objects on first load of a newly connected client may not replicate their current position if they are currently gripped (during client side movement grips movement replication is turned off to save bandwidth). You may want to set this to off for all pre-fab object thats you anticipate that being a problem for.

It was defaulted to off for awhile in the plugin, but placing random statics meshes into the level without making a subclass for them first wouldn’t replicate the static mesh (since static meshes don’t replicate).

Grippable Components and Replication

By default all components in the engine are set to bReplicates = false. The grippable components specifically have some properties that can be useful to replicate to clients (Gameplay tags and VRGripInterfaceSettings), if an object is not set to NetLoadOnClient and is placed in the level with custom settings over its base class the values will not replicate to the client unless you set the component to replicate.

bReplicateGripSettingsAndGameplayTags enables / disables them being sent when the component is set to replicate.

Also there is now a bReplicateMovement variable on all clients so that when replication is enabled they don’t add additional overhead by also defaulting to replicate their position.

Physics grip tips for better behavior:

Physics grips as of a few versions ago now grip at the COM (Center Of Mass) of the gripped object, this provides the most stability during the grip. However this can cause collision to behave slightly differently than expected for some items (like swords) where the point of rotation would be expected to be at the handle/grip itself.

Changing the center of mass of your object to known primary grip points or doing it at the time of gripping with SetCenterOfMass() will in many cases provide you with a better result.

This is now done by default in the plugin and can be turned off in advanced physics settings for a grippable

Using Additional Late Update Components

This array on the motion controllers allows for late updating additional un gripped / attached components. If you use this and remove an object from it without moving it afterwards you likely need to call UpdateComponentToWorld on it to correct for the late update offset post 4.18 (4.17 with my plugin). This is because the new late update comes in after the last movement and offsets the render primitive.

Using components instead of mesh sockets for snapping

If your game would be easier to make by passing in scene component transforms instead of socket transform for grip points (move around on the actor, rotate on startup, ect). You can override the GetClosestGripSocket function in c++ or Blueprint (VRGripInterface) and return the Relative Transforms of your chosen scene components instead of the default implementation of returning socket transforms.

Suggest Edit