Hi guys,
Anyone know where I can find a tutorial for creating a scalable door blueprint?
Just a basic blueprint where I can change the door’s height and width with float parameters.
So far I managed to do it by dividing the door to separated parts: each beam, lintel, door and handle.
I managed to set the height by moving the lintel up and down and scaling the door in the z axis.
I managed to move one of the beams according to the desired width, but scaling the door and lintel’s width doesn’t work correctly.
Any ideas?
I’m not sure why you said you’re looking for a blueprint, do you mean the model? Because that’s what you can transform. If so, you can find door assets from many different sources or create a simple one for yourself using a 3D editor like Blender.
Oh wait did you mean dynamic scaling using blueprints? Yeah you can do that using a set world scale node.
Hey @T4l_R!
There’s not really much in the way of a tutorial specifically for this that I could find, but I could probably walk you through it!
Something to realize here is that the other pieces need to react relative to the parent, location-wise, so you need to set up your hierarchy appropriately.
This is how I would set it up:
root
lintel
beams (if beams are on the LINTEL)
doorhandle
beams (if the beams are on the DOOR)
That being said, you could also place sockets on the static meshes for the other static meshes to snap to as a double-up.
Hope this helps! Let me know if you need some more help, this should be really doable.
Hi,
Do you mean that you want to scale the door at runtime using a float parameter that you will define or input?
I so you can make an interaction event to the door and set the scale node to take the float as input.
If not in runtime, i think it is pretty easy to do it. Just scale the object you want by sekecting it and scaling it with the scale tool. In both blueprint or static mesh object placed in the world.
Thanks for the quick reply.
So right now my hierarchy is:
root → beam1, beam2, lintel, door → handle.
I easily set the door’s rotation with a float parameter.
The lintel’s origin is on the floor at z=0, so setting its height according to a float parameter is easy as well.
Beam 1 is at 0,0,0, so no matter what it doesn’t move or changes its scale but the height (height changes according to the same float parameter to set the lintel’s height).
Beam 2 moves on the x axis according to a float parameter to set the width.
The problem is setting the scale on the x axis of the door and the lintel. As you can see in the screenshots, they don’t reach the other beam (the beam is at the right location).
The way I try to set the scale (for now) is taking the door width parameter and divide it by 90.
The reason I do it is because the width of the base door geometry I made is 90 cm and I’m setting the relative scale, so I want the base scale to be 1 and any change of the value to be relative to that. The thing is, that the meshes of the lintel/door doesn’t start from 0 on the x axis, so I tried to add the width of the beams to that calculation, but that didn’t work as well.
Can you show the code? I’m thinking with so many pieces you could use snapping and sockets! You can set the sizes first, then on BeginPlay snap the Beam2 to the lintel.
Here’s a tutorial that showcases how to do that!
Disclaimer: This link is not associated with Unreal Engine, Epic Games, or their partners.
Hi,
just scaling the door is not an option, as I don’t want to stretch the geometry. That’s why I divided the parts and only scaling it in a way it won’t ruin the shape of the door.
As I mentioned in my answer to @Mind-Brain, the only part I’m struggling with (at least at the moment) is scaling the width correctly.
Hi,
I don’t think I need sockets for this one, since some positions are changing dynamically, or positioning the parts is not that of an issue. The problem, as I mentioned before, is scaling the width of the door correctly.
I’m sorry, I must have misunderstood. I thought you were saying that the beam was coming away from the door when it has adjusted.
Your previous post is rather difficult to read, unfortunately the general nature of what you’re saying doesn’t convey the exact nature of your problem.
for instance:
Position? Scale? I’m pretty sure it’s not rotation, but it could be either, here. Do you think you could try to rewrite that entire section a little more specifically?
Hey @T4l_R !
Did you get it figured out? Let us know if you did, and if so, it’d be great if you would post the solution for future solution seekers!
Let us know if there’s anything else we can do to help!
Unfortunately I didn’t find a perfect solution. Just decided to change the pivot points for some of the parts. It gave me a good solution for the door frame, just not for the door itself (yet). If I manage to get it to work I’ll post a solution.