I added another example to the example project. It shows how to make a user-friendly physics handle with MSSR.
Some parts don’t even require the plugin (grab speed ease-in, depenetration, etc.)
Hi @ Great plugin. The only issue I am running into is that I am using this for a Ylands type building system. And if I have many building (snapActor) actors near eachother when a Snap Preview actor is near, perf starts really tanking. Is there something I can disable or optimize to help this?
Did you try to use the async option? There is an example of that in the example project. It will run the search for snap points on a separate thread, so the fps should not drop much. You can activate it on the preview actor and use SnapActorsAsync method. On your screenshot it’s not used i think.
> Another big question I had is, can the system be used with instanced static meshes?
Good question. You can snap stuff to instanced static meshes if you add them in target actor components array in params struct. But I’m not sure if it’s possible to snap an instance to something. The plugin expects an actor or a component as input of snap method. Do you move instances in your building system? Maybe you can snap a normal actor, like a placeholder, then move the instance accordingly?
That would be an interesting option to add to the plugin i think.
Hi everybody,
I finally got an Oculus Rift, so I started to make a better VR example for the plugin. Check it out: MSSR Examples by Inu Games, it’s the MSSRVRv3.zip
For the moment it’s only the exe, I will put the project files later.
Some changes so far:
Fixed a bug in the old example (it was attaching to the wrong component)
Control scheme remade, now it’s Grip to grab/release, Grip+Trigger to detach. There is no separate modifier to snap, just move the cube close enough.
And if you don’t move the hand for a moment the snap preview will go away. This allows to hold the structure with one hand and to add cubes with another, without having 2 previews kicking in.
Cube are smaller, their default cubes were too big for VR
There was a bug in FindActorsNearHand, it sometimes couldn’t find the cubes overlapping the hand, but only the left one. I don’t know why. I replaced the overlap query method by another one and it works now.
Cubes have depenetration speed set to a reasonable value
Table was a BSP, which is not good for collision
My VR experience is only 2 days old, so please excuse the lack of dexterity and let me know if something can be improved or added!
Hi. Great plugin.
I have a small problem. The preview works great but when I release the object it falls or snaps random to another object, although I use the same snap setting for the preview actor and for the SnapActor node
I have an VR project with simple attaach detach (acually almost as in the vr example) as I said everything works great except that the snap actor snaps to an random actor in the scene and not to the one shown in the preview
It’s difficult to say what’s going on based just on the info you provided. One thing I notice is the “KeepRelative” in the detachFromActor. KeepRelative will move the GrabbedActor, so try to use keepworld maybe
Oh wow, that was really it. Changed to “keep world” and everyting works fine. Thats actually strange that the detach influences tha snap. But int the end untill it works I am happy. Thanks a lot!
Detach with “Keep Relative” will actually move the mesh, then the SnapActors which comes after that will search the snap points for this new position.
Keep Relative keeps the same relative transform of the mesh, it means its relative transform wrt the hand will become its new transform in the world. “Keep World” recalculates the mesh transform so it doesn’t move after detach. I don’t understand why the Keep Relative is a default option, seems pretty useless.
> Cubes have depenetration speed set to a reasonable value
How can I set the depenetration speed manually in the project I derived from your previous project (MSSRVRv2)? I would like to fix that only before the next iteration.
Oh, so it’s the Static Mesh property, not MSSR related. Thank you.
Another quick question: I couldn’t find the material variable in preview actor. How can I override M_PreviewMSSR without changing the plugin source files via variables? Where do I set it?
The variable is called “PreviewMaterial”, and you can see examples in MSSR plugin content, Materials folder (you need to check “Show plugin content” in Content browser properties.
If you need to make your own material you need a parameter called “Visible” which is the opacity of the preview. BP_MSSRPreviewActor will use this to hide/show the preview.
Hey, this plugin looks great and has inspired me! I tried the playable demo showcase and it works amazingly! I have a question about the kind of use I have in mind for it:
I’m wondering how it handles two sockets on the same side of an object, for instance if you wanted to connect bricks to make a wall, offseting each layer, or even making a corner with the bricks by rotating 90 degrees. I drew a quick diagram to show the kind of behavior I’d expect to happen, and if it’s not default would it be something I could implement easily? (The red lines are sockets, green is the placement preview)
The socket matching and snapping is always one to one. There is no special handling for two sockets on one face, the plugin will just pick the closest matching pair: one on the green brick and one on the black one, then use that pair to make calculations. So all the options on your schema will work. You need to give compatible names to those sockets, like Brick_0, Brick_1, etc. and they will snap together like you expect.
Migrate MotionControllerMap2 and it’s dependencies from MSSRVR project to the Quest project (don’t forget to move Config/DefaultInput.ini too)
Go to the UE4.24 Plugins folder (C:\Program Files\Epic Games\UE_4.24\Engine\Plugins\Marketplace) and copy paste the MSSR plugin into your project’s Plugins folder.
In your folder edit MSSR.uplugin and add “Android” to the “WhitelistPlatforms” section.
Open the project and in BP_MotionControllerDetach modifiy the preview actor init like the screenshot bellow. This is because the async (multithread) preview is not working well on Quest. Probably there is not enough cores on this thing. Switching to sync preview with a delay of 0.4s seems to run at max fps. To investigate…