I made a rig for this mechanism and tried to add it to the blueprint. But I can’t find how to do it. And how to work with rig control in the blueprint.
Hey @NiteVelan! Maybe this amazing tutorial can help Of course it’s just a guide to get you a better grasp on the subject, you’d need to set up things from scratch for your specific objective. But I found the explanations in the video to be pretty clear so I hope you can also find it useful!
Make an ik rig that will drive the mechanism procedurally.
Make an animation in a DCC application (Maya, Blender, 3dsmax) of the full range of motion of the door and set the position of the playback start position depending on the angle of the door. (door mesh can then be separate from the arm)
Thank you for your answers, but I told that I already made a rig for the mechanism. I know how to make rigs and have done it a lot. But I don’t get how to use it in BP. And I do not want to use premade animation to open the door. I have two controls in the rig and want to set transform to these two controls.
You can’t do physics on stuff like that.
You have to use math and, materials, or rotators.
Ancient stuff, but here is a working example
You can clearly see why you don’t use physics on doors.
The top mechanism hinges are already just math based, which is why they react mostly Ok.
For the n^th time.
You do not use skeletal meshes for non soft bodies. Ever.
And people who keep posting to do similar stuff on this (and other) forum are the ones at fault at this point…
OP asked what the best way was, and everyone just goes along with stuff that you ought to know doesnt work. Dissapointing to say the least.
@NiteVelan
Scrap your skm.
Separate the objects and align them so when you export their location is on the pivot point(s).
Export the parts out as separate meshes.
Combine them in a blueprint/move them in place.
Then, you just add simple logical math to govern their position by rotating on global Z as a factor of the angle of the door.
You know what? Here:
(You can clearly see why you don’t use physics on doors.) Even if you need to make some stuff, like pushing some object through them? For example hospital medical bed through a double door? How can you make an animation for this stuff? Without physics I doubt.
About rig. Yes, I have thought about it as you suggest before my post on the forum. And started doing it, but then I thought what if I need to do some more complicated stuff with a more complex structure? So I made a 5 min rig. And now I found how to set transform. First, get the Anim Instance from the skeletal mesh, after cast to animation blueprint class, and then set transform. It works, but now I have another problem. On a video, you can see. That animation has a delay. How to fix that?
Dont you also have all sorts of light issues since you are using a skeletal mesh?
Your issue could be the animation itself.
Re the “how without physics” - easily and much more reliably.
A preset animation will alwas work right, look the same and be consitent.
Once you add 3 or 4 different ones and randomize which you fire off, the user can barely tell if its true or not - ofc, other objects will bounce back from it instead of swinging it open…
(Dont you also have all sorts of light issues since you are using a skeletal mesh?) 0 light issue.
Work with several animation and animation trees. It’s a real brain pain if you need this type of quality. I used skeletal mesh but only rig from him. All parts of the door are attached to sockets of the skeleton. I added a collider separately from the doors and set them invisible. Then I get from these colliders only z-axis rotation and transfer to the rig. So, there is no need for complex math equations, several animations, an animation tree, and all other stuff. Just one right rig.
Still, I have a question about the animation delay. Who knows what is a problem?
Lol, finding the point of intersections between 2 circles is essentially first grade trig.
Who said anything about that?
I said the exact opposite. ALL you need is regular meshes and math.
This is a DOOR, it doesn’t bend, stretch, flex, or deform (and if it needs to deform you do that via material shader ANYWAY).
You wanted to know the “Best Way” - and coincidentally Best Practice way right?
I think I answered that.
Given the mess you are making I think you are the only one who can sort out what your delay issue is.
My money is on bad animations.
I was talking not about finding one point between 2 circles. But about using physics or not. And without math or physics how you can do this collision type? I was talking about interaction with objects.
(Given the mess you are making) Where is the mess?
One simple rig without a complex structure, one simple animation blueprint for each side. And one variable, that transferred from the main BP to the animation BP.