Thanks. I will test it.
Hi everybody,
I remade the example project to have all examples in one demo, with a menu to navigate between levels.
Fixed couple of issues: missing mesh and UE4.23 compatibility. Project is 4.22, as before, but now it should work with 4.23 too.
Please check it out: **MSSR Examples by Inu Games **
MSSRExamples.zip contains the playable demo with all example levels, and MSSRExamples_Project.zip contains the corresponding project files. VR demo is the same as before, no changes yet.
Please let me know it works fine for you.
Hello @ . Iâve recently bought your MSSR plugin. Thanks for creating it, itâs really functional and easy to use.
Iâm using it for a VR project, and the modified BP_MotionController somehow disables the hand grip animation in the default VR Template. Hand grip animation plays only if you are grabbing an object in MSSR, but it should play whenever GrabLeft or GrabRight is triggered. Do you happen to know that where the blueprint flow breaks, or does enabling the animation (grabbing nothing) contradict with the MSSR functionality?
Thanks.
Original VR template (4.23): GrabRight plays MannequinHand_Right_Grab
MSSRVR_Project (4.22, Jun 27, 2019): GrabRight doesnât play MannequinHand_Right_Grab unless a cube is grabbed
Question 2: What exactly do âMotionControllerPawnDetachâ do? Does it replace âMotionControllerPawnâ as the player pawn? Mechanics I put into MotionControllerPawn donât work with MSSR at the moment.
Hi @Arkhemor
It seems I forgot to set bWantsToGrip, you can fix it easily if you edit BP_MotionControllerDetach Grab and Relase events, which are located in the âGrabbingâ event graph. It should be like on the screenshots below:
[ATTACH=JSON]{âdata-alignâ:ânoneâ,âdata-sizeâ:âmediumâ,âdata-tempidâ:âtemp_176801_1573479701464_17â}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64
â
[ATTACH=JSON]{âdata-alignâ:ânoneâ,âdata-sizeâ:âmediumâ,âdata-tempidâ:âtemp_176802_1573479703039_844â}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64
â
Yes it replaces MotionControllerPawn, but it mostly the same. It uses BP_MotionControllerDetach instead of BP_MotionController. BP_MotionControllerDetach is where the bulk of MSSR code is located. in the Grabbing event graph. Basically, I modified the way objects are grabbed and releaed, but the rest of the blueprints are the original ones from the VR template.
And the âDetachâ in the name is because in the beginning there was 2 VR examples. Another example simply used the DetachFromActor function, which was not really doing a good job keeping things realistic. In this version of the example there is a more complex algo that you can see in the BP_MSSRHelpers:: Detach function.
Please let me know if you have more questions
Hey,
I get Invalid File Specified error from the BP screenshots you uploaded. Can you upload them again please?
Thanks for the explanation about the Motion Controller Pawn.
I would like to use the plugin for a modified/custom VR pawn, so is there any documentation about how to implement it into a blank project or VR Template from scratch?
Thanks for your support.
I hope it works now.
VR example is basically the default UE4 VR template modified a little bit. The modified part is in those Grab and Release events mostly. You can check how they are done, they are not very complex. If there is something not clear feel free to ask.
Yes, the hands are working. Thanks a lot! Now Iâm working on the other implementations.
MSSR works well while grabbing the default BP_PickupCube, but it wonât work with new grabbable objects. Here, I create one duplicate and one child from the default PickupCube. What could be the issue? The created new objects (child or duplicate) are grabbable in the default VR Template.
In most of the MSSR examples, the âGrabâ event checks if the actor has a tag, usually âpickupâ. Here, in the VR example, the check is in the âGetActorsNearHandâ method (see pic). You can check one of the cubes, look for Actor Tags array in the properties. So you have to add a tag like that to your actor.
You can also change the code of the Grab to check some other criteria, like just grab anything which is a physics actor. The original example used an Interface PickupActorInterface to see what you can pick, but I donât like this approach, because it forces you to use a custom actors. A tag can be added to any actor, including basic static mesh actors.
And to âsnapâ you need to have sockets defined on those meshes, but I suppose you know that already. If not, check Overview level in the example project and the tutorial video.
I didnât realize that actor tag wasnât embedded in the blueprint. Sorry for the confusion, fixed it and it works like a charm now. Thanks again!
Another question: Do I set the global snap search distance from the Structure Variable under BP_MotionController? I couldnât get it to work.
Under BP_MotionControllerDetach if you are using MotionControllerMap2. There are 2 example maps, MotionControllerMap and MotionControllerMap2. The â2â uses more advanced algorithm to detach things, so it uses BP_MotionControllerDetach and MotionControllerPawnDetach.
The difference between two is how they manage the âDetachâ operation.(Grip+Trigger). The first map will just call UEâs DetachFromActor. The problem is that you can easily end up holding something with a hole in the middle.
Second map will rebuild attachment trees to avoid this situation. It will use MSSRâs snap sockets to find which cube is logically attached to which one then use that to make new trees without holes. The algorithm is in BP_MSSRHelpers Detach function.
Thanks for the explanation, now it works alright.
I noticed a glitch with the parent objects. If you attach multiple attachment trees, some of the attached objects lose their physics. It really compromises the gameplay I am trying to implement. Can you replicate this, and any idea on how to avoid it?
Sorry for asking too much questions, but I loved your plugin and unfortunately Iâm quite new to UE4.
Edit: Console log: Blueprint Runtime Error: âAccessed None trying to read property AttachedCompâ. Blueprint: BP_MotionControllerDetach Function: Execute Ubergraph BP Motion Controller Detach Graph: Grabbing Node: Set Simulate Physics
No prob. I will try to reproduce that tomorrow. Physics in UE are tricky, because underlying PhysX library represents things differently, there no trees in PhysX.
I canât reproduce it. I watched your video and tried to do exactly the same few times and it works correctly.
But I noticed something. You spawn new cubes right? Do you spawn them with all the right parameters?
Show me your spawning code please.
edit: I spawned cubes too and I have the same error. I will try to find why
I think I found it. The problem is the âauto weldâ physics parameter of the BP_PickupCube. Usually itâs enabled by default, but in the PickupCube bp it was disabled. So I enabled it back and now it seems to work also with the cubes you spawn on runtime.
To enable it, you need to open the BP_PickupCube, disable âSimulatPhysicsâ, check âAuto Weldâ, then enable simulate physics again. Otherwise itâs grayed out.
Would have never guessed Auto Weld, thanks! It fixed other attaching/detaching problems I havenât mentioned too. Hereâs the actor spawner BP, in case anyone needs it.TP_Cube_Spawner posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Two more questions:
- How do you modify the âforceâ preview material?
- I want front face of a gemoetry to attach with the other oneâs back only. Currently, two front or two back faces can be attached. Is there any socket implementation that I can use to avoid same-face snaps?
Some of physics parameters are very obscure. I try to understand how they work by studying the source of the engine and by trial and error. I think there are bugs i the engine too ![]()
>How do you modify the âforceâ preview material?
You can set it on the preview actor, itâs a variable.
> I want front face of a gemoetry to attach with the other oneâs back only. Currently, two front or two back faces can be attached. Is there any socket implementation that I can use to avoid same-face snaps?
Iâm not sure I understand, maybe you can show some example?
Did you tried +/- sockets? You can add a sign to the socket name, like âSocket+â or âSocket+_0â or âSocket-â etc. Those signed sockets will only snap to sockets with the same name and opposite sign, or to a socket with the same name and no sign.
There is also the âsnap open onlyâ parameter.
Those points are explained in the long tutorial and overview example, check that.
Btw, i think I understand what you mean. You should ensure that your sockets are pointing outside of the geometry. The X-axis (red one) should point outside, like the normals, not up or sideway. Because, by default, MSSR aligns things respecting this direction. Check where is the X axis on the pickup cube mesh sockets for example. This is explained in the tutorial too.
> Some of physics parameters are very obscure. I try to understand how they work by studying the source of the engine and by trial and error. I think there are bugs i the engine too ![]()
Well done on the good job then. Very much appreciated.
Looking at the extended tutorial now. Mine looks like pretty much a positive/negative pole issue. Hereâs a scheme of my socket setup, the only snap that I want to enable, and two snaps that I want to avoid:
Yes, that can be solved with socket polarity. Call them something like Socket+ and Socket- and they will only snap in the right way, âplusâ with âminusâ only. There is an example with a hat and a âheadâ, and the sockets are called âhat+â on the head and âhat-â on the hat.
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.)
You can see a little video preview here:
https://twitter.com/games_inu/statusâŚ14829933334529
and download it on itch as usual: MSSR Examples by Inu Games
Features :
- Setup phys.handle with MSSR.
- Realistic detach
- Mix between simulated and static actors.
- Physics handle Interpolation Speed ease-in. It helps to grab things more âgentlyâ, example video: https://twitter.com/games_inu/statusâŚ45301538443264
- Max depenetration speed on the physics actors. Setting this will limit forces applied to separate overlapping actors.



