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 do I restrict the movement of an actor to just one axis or only one rotation?

Hi, I followed Tesla Devs Tutorial on how to pick up objects and wanted to know if you have any idea how I can lock an object on only one axis or rotation. (For example if I want a drawer only to move forward an backwards - for only so far that it doesnt go through the back/ its startlocation or out in the front - or for the axis some lever to pull, so you can pull it down, but not through the wall or away from it) .. Hope you get what I mean and you have an idea.

Product Version: UE 4.13
more ▼

asked Oct 19 '16 at 01:18 PM in Blueprint Scripting

avatar image

60 3 5 7

avatar image R0tn3k Oct 19 '16 at 01:34 PM

Just realised there is some sort of what I want, so I'd like to change it a bit: How do I customize the move-/rotaterestrictions so I can set some kind of max movement( still going with the drawer example ^^) so I don't have to build the drawer that it just doesn't fit through the front by making the end a little bit bigger or something( that would be a workaround I guess, but yeah - not everytime practical ^^)

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

1 answer: sort voted first


You can set constrains for movable objects under the 'Physics' tab in the settings of a component that can simulate physics. You can restrict the axis that an object can move or rotate on under the 'Constraints' tab. Your example with the drawer might be a bit trickier tho, as I am not aware of any settings that can limit how 'far' the object can travel from it's original location, I think this needs to be done in code/Blueprints.

Wouldn't making a drawer opening/closing animation be a better idea, as it seems to be a very constrained and predictable animation that doesn't require actual physics simulation? Of course this might be not the case in your game.

more ▼

answered Oct 19 '16 at 04:19 PM

avatar image

191 6 12 16

avatar image R0tn3k Oct 19 '16 at 06:33 PM

ANIMATION! ... of course, I guess that's exactly what I had in my mind, but I'm just learning UE4 and until now had no contact with them. Are there tutorials you can recommend, except the unreal-docs and Tesla Dev/similar channels findable from his page? ^^

avatar image Kontur Oct 19 '16 at 06:43 PM

I'm sorry, but I'm not aware of any external tutorials of this particular subject matter. However, I think I can point you in the right direction on what to look for. If you don't want to make the animations in an external program, I think Timelines would be the best option. Here is the official documentation about timelines (sorry:D)

Unreal Docs- Timeline

And it also recently came up as a topic in the forums recently, so you might want to check it out as I posted some screenshots there about how to set up a very simple door animation (just implement it using a drawer, shouldn't be too different)

Forum post about using Timelines

I hope these will help you a bit!

avatar image R0tn3k Oct 19 '16 at 06:54 PM

ok, I will take a look in it, again thank you ^^

(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