x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to create an automatic Sliding Door?

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.

Product Version: Not Selected
Tags:
more ▼

asked Mar 23 '14 at 07:36 PM in Blueprint Scripting

avatar image

brucem91
1 1 4 3

avatar image [Epic] Gribbs ♦♦ STAFF May 27 '14 at 05:22 PM

Hi brucem91,

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.

Thank you.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Howdy!

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:

alt text

The door should slide open/closed with this setup.

alt text

-W

slidingdoor.jpg (63.1 kB)
more ▼

answered May 21 '14 at 03:08 PM

avatar image

DizzyWes ♦♦ STAFF
5k 145 64 206

avatar image brucem91 May 21 '14 at 04:36 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hey Bruce,

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!

-W

more ▼

answered Mar 24 '14 at 01:43 PM

avatar image

DizzyWes ♦♦ STAFF
5k 145 64 206

avatar image LewisP May 21 '14 at 09:44 AM

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.

alt text

Then I have copied the blueprint from the level blueprint in the level tutorial referred to by the OP.

alt text

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!

screentshot 2.jpg (259.3 kB)
screenshot 1.jpg (440.7 kB)
avatar image brucem91 May 21 '14 at 04:30 PM

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.

alt text

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:

alt text

Of note:

-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.

Thanks,

Bruce

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question