Hello. I am attempting to create a test door in UE 4, and I am having an issue with being able to move my door. The mesh is listed as a static mesh in the components list, however under details I have Mobility set to “Movable”. When I hover over my door in the graph tab, I get “A StaticMeshComponent is a mesh that does not animate”. Likewise I am trying to plug it into a Set Actor Location node, but again it is not compatible with the actor node. Is their anywhere else I can possible switch the mesh to movable?
I tried watching the level creation tutorial that unreal put out on youtube, but it appears to be using level blueprints, and not class. In his tutorial he goes into the details like it is any other object in the world. However I am trying to make it a class blueprint so I can repeat the door in several spots within my level.
Any suggestions would be much appreciated.
If you post an image of your Blueprint, I might be able to help out and see what’s going on. Instead of using the Set Actor Location node, have you tried moving your door through timelines? Take a look at the Automated Door Tutorial - Timelines section.
In fact… if you haven’t, you might want to take a look at the whole tutorial itself as it will help you with the second part of your question regarding using multiple instances of the door in your level.
What’s really good about this tutorial is that it will allow you to not only be able to use the door in multiple instances, but it will also allow you to override how the door works (via trigger or usable) as well as override the door’s properties themselves (materials and static mesh components).
Hope this helps!
I believe I may have followed the same path as the OP and arrived at the same stumbling block. I completed the level tutorial and wanted to try it as a class blueprint. I have attached my progress and appear to have become stuck at the same point as the OP.
I have built the door I want to move and two panels either side that should remain static, in the blueprint components editor.
Then I have copied the blueprint from the level blueprint in the level tutorial referred to by the OP.
Now I want to refer to the component that I want to move in the blueprint and it doesn’t like it.
I will go through the blueprint automated door tutorial that you suggested and see whether that help.
Many thanks in advance!
I haven’t followed along with this tutorial yet, but try using Get Relative Location and Set Relative Location for the door instead as seen below:
The door should slide open/closed with this setup.
So I did eventually figure things out. Looks like LewisP is running into the same issue I was, where simply translating Zak’s level blueprint door tutorial to class blueprints causes some issues. Anyway, I believe the key is how the components are added.
In this picture, the root is a simple box. Then I added the door / trigger as children of the root. If I remember correctly, the door is a Static Mesh added via the “add component” drop-down, and not simply dragged in from the Content Browser. Then I was able to hit use selected from content browser to add the mesh.
Secondly, here is my event graph:
-The DoorDriver is a timeline, but isn’t used for the distance of the door. I believe the timeline was a vector, so I had to animate 0-1sec in a specific axis
-DoorStart is a variable (right click promote to variable) set to 0.
-DoorEnd is another promoted variable set to the total distance the door should travel. I’m sure this could easily be both negative and exposed via construction script, so that you can individually change each doors distance in the world editor.
Everything else should be self explanatory. Here is the tutorial I followed to get this working:
[UE4 Door Tutorial]
Let me know if you need any more help.
That should work too. I’ll try that when I get home. Like I posted earlier I did eventually get it working (slightly differently), but I think the problem was that the way the door was brought into the blueprint, it was set completely static and therefore unable to move. But I’ll try your way as well, as the worst case that happens is I learn something new. And I’m sure that Get Relative Position and Set Relative Position will become very useful for me in the future
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.