But its released for 4.24.3 ? Thats the engine i have to work with ![]()
I found the problem, they ninja-added some new build parameters in 4.25.3 but never told it to nobody. Now I will package and submit it.
Okay, version 1.1.3 with ISM support submitted, waiting for the marketplace approval
I will put the new example when the plugin is updated
Version 1.1.3 is published, it includes ISM support. The example project and demo on itch.io are updated too, check the âISMâ map for an example of how to use it:
I hope everything works alright!
@ What would be the best way to apply scale to a group of snapped objects ?
Letâs say I snapped 3 cubes together, to have a nice cubic bar, and I now want to make it bigger.
Should I detach all actors, scale them up, then try to re-attach them together ?
Or is there a better way to do it ?
Thanks.
Hi Entilzar,
Iâm not sure I 100% understand the problem, but if you have 3 actors attached you need just scale the root actor and the children will scale with it automatically. So, no, you should not detach anything I think.
Yes, thank you, it worked quite well just by scaling the root actor.
Itâs not perfect however, as I encounter a strange behavior afterwhile.
What I do is quite complicated, I admit, but to sum it up quickly :
- Itâs a VR app
- When a hand tries to grab an object held with the other hand, but with Scale Mode actived (via a button), I change the material of the Held Object and all its snapped object (to show itâs possible to scale them)
- To do that, I find the Top Pickup Parent, then I Explore it to get the arrays of Connected Actors, and I change their Material too.
- If Grab occurs, instead of really grabbing the object and switching hands, I start my Scaling procedure. The tricky thing is I cannot use the Held Actor directly (jittering occurs), so I duplicate the Static Mesh components and operate on them, while hiding the real Held Object and its children.
- Then, when the Scaling hand finally opens up, I apply the final Scaling computed value on the Held Object and show the real Held Object and its children back.
Problem is, with my 3 object-bar :
- When I hide the Held Object, the result array of Explore contains 2 items, each connected to 2 Actors.
- When I try to show them back, the result array of Explore contains 2 items, each connected to 0 Actors.
- But if I try to Scale again the Held Object, the result array of Explore contains 2 items, each connected to 2 Actors !
- And of course, after the Scaling, the result array of Explore contains 2 items, each connected to 0 ActorsâŚ
So, there is definitely something going wrong with what I do.
I managed to get approximately what I want by keeping track of objects set invisible, but I suppose there is a way to do it properly.
Also, I tried to Rebuild Explored after Explore, but itâs not better.
I probably have a misunderstanding of how I should to that ![]()
By Explore your mean the âMSSR_Helpers:: Exploreâ function from VR examples project? This one is pretty specific to the realistic detach example, it breaks attached actors in subtrees connected by mssr sockets. Because of that it supposes the actors are all correctly set up with collision and other stuff.
If you simply need to find all actors attached to an actor you donât need something as complicated as this. You can use basic UE4âs GetChildrenComponents or GetAttachedActors blueprint nodes.
Ok, I now use GetAttachedActors in a recursive function to get children of children, and itâs cleaner.
However, one big bug remains : when I apply scale to my 3-cube bar (composed of Cube1, Cube2 and Cube3), sometimes (difficult to know when that happens), Collisions on the Static Meshes of the snapped Actors Iâve just rescaled are completely messed up.
If I use the console to Show Collision, all is displayed as expected, but when I try to Grab one of the snapped Actors (say Cube 2), either no Collision is detected by GetActorNearHand, or if a Collision is indeed detected, the actor and component returned are from one of the others snapped actors (Cube 1 or Cube 3), not the one I try to Grab. When this occurs, if I try to Detach one of the snapped Actors I can Grab, I may get a Warning concerning the Actor I cannot Grab : âtry so Simulate Physics but No Rigid Bodyâ.
So visually all seems correct, but âphysicallyâ objects are not where they seems to be.
Itâs a problem because I cannot scale them again, and snapping and physics do not work properly with the âghostâ actors.
I donât know whether this is a UE4 or a MSSR issue, but maybe you have already experimented that kind of bug.
Yes, I know that bug. UE4 is not very robust when attaching and detaching physics actors, itâs pretty easy to have this problem.
In my experience there are 2 things which will cause the bug:
It can occur if the âauto weldâ parameter in sm actor physics properties is disabled, so make sure itâs checked.
And another way to have it is to detach/attach physics actors when their physics are temporarily disabled. So check if actors are simulating physics before attaching/detaching them.
I had to fight a bit to activate the"auto weld" parameter in SM Component, as it was grayed out, but just setting the SM as Stationary then back to Movable made it clickable.
It was a bit better, yet still not perfect : in some configurations, the âghostâ effect still occured, but just grabbing the object back and forth with one hand then the other was enough to make it disappear at some point. Not user-friendly, but much more usable.
So I tried to investigate why âjugglingâ with the object would fix it, and I have to say I still donât know, but at least I was able to create a function that âMake Rootâ of each snapped Actor, one Child after the other, and back to the original root. The original object is Detached at that moment, so I added a hacked Grab to force grabbing it again, and I can say it works pretty well.
Not sure what I can do more, as just changing the Scale of the object would make the bug occur (no detach/attach), so no other lead to investigate.
Maybe this kind of bug will be fixed when Chaos is used instead of PhysXâŚ
However, thank you for your help, it was very much appreciated ! ![]()
Edit : Oh, and I forgot to mention another parameter that was very helpful to squash the Bug.
In the Static Mesh Component -> Collision -> be sure to check âMulti Body Overlapâ (expand by clicking the arrow if not visible).
Hey @, really appreciate the level of support youâre giving all of us!
Iâm having an issue with Get Connected when trying to attach to a socket that is >= 2 units away from static mesh itâs part of. I can snap to the sockets, but I have code that checks if âGet Connectedâ returns anything and destroys the new component if there are no connections. The attached picture is an example of the static mesh Iâm having issues with
It appears that UMSSRBPLibrary::MSSR_GetConnected at line 185 hardcodes the SearchDist to 2.0f. Is there a reason to not use the Snap Settings search distance? Iâm guessing increasing this number will fix my specific issue, but Iâm not sure if thatâs a proper generic fix.
Thanks!
While increasing this hardcode did fix GetConnected to return something, it broke checking to see whether or not a socket was open if the actor was too small in some cases. As I anticipated, Iâm guessing this algorithm would need a slight rewrite to get this working (or Iâm missing some special way to get my use case to work)
I got something working (which is what Iâm guessing your suggestion would be). I extended the collision of my Static Mesh to the extents Iâd want to connect (i..e to the sockets). This worked was a no-code change solution
Hi SeesePlusPlus,
Itâs 2cm because weâre searching the sockets that are exactly at the same location. We donât need to look far away. But if the socket is outside of the mesh collision then itâs a problem, because we will not find anything. I usually suppose the sockets should be inside the collision. If itâs really needed to have sockets outside collision, then the solution would be to add an argument saying to override this value, for example we could use search distance from snap parameters.
Thanks for the quick response. I currently have no need for the sockets to need to be out of the collision, nor can I think of a scenario where Iâd really want that. While I always love to have options, Iâm happy with how it is for now!
Thereâs bug with Preview Actor in VR Example project (4.25)
Iâve just tried to use it with 4.25.4 and I donât see anything wrong with the preview.
Can you please describe the bug in detail: how can I reproduce it, error messages, screenshots etc.
Thanks for quick support. I just updated 4.25.3 to 4.25.4 and all bugs disappeared magically.
Unfortunately I canât take screenshots or video for you because bug is not existing anymore after update.
But when I had actor grabbed in VR, it showed preview actor stacked with grabbed actor and there was some weird lag with preview actor when moving motion controllers while actor grabbedâŚ
However your plugin is awesome and Iâm happy that I can continue development with 425.
Cool! Iâm happy it has disappeared! It was probably some bug with the 25.3 because I tested when 25.0 was released and didnât seen anything strange.