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"

Check if a component rotation is in front of another component?

Hello

Im working on a room placement system . in short the player can place rooms in the world that are just a prefab / blueprint, rooms can only be placed if one of its doors is overlapping another room door so they are connected

Right now im doing the collision check as the following: If only the room door is overlapping another room door then it sets the room to placeable and places it in the world, if the whole room is overlapping the room then it is set to not placeable ( since placing a whole room inside another room would be silly : p)

This works rather well

alt text

But again, since im just checkng if the rooms overlap it can lead to this

alt text

As you can see the room door is overlapping another room door and hence its set to placeable So i believe that checking if the rooms rotation / orientation( front, front, left, left ) is the same it would solve the problem so only doors that have the same direction can be placed next to each other

Product Version: Not Selected
Tags:
more ▼

asked Sep 06 '14 at 01:36 PM in C++ Programming

avatar image

alvarofer0020
95 15 17 24

avatar image Virusik Sep 06 '14 at 05:52 PM

Vector mathematics, Check out info about dot product, and cross product with that functions u can make orientation check.

avatar image alvarofer0020 Sep 07 '14 at 03:11 PM

Thanks, but math isnt my strong side is it possible you could guide me in the right direction?

avatar image Virusik Sep 07 '14 at 04:00 PM

I haven't used that in UE4 yet (i am newbe in ue4) i was just doing such stuff in unity before. there u are a link which can give u some adivce http://docs.unity3d.com/Manual/UnderstandingVectorArithmetic.html U should be able to find dot function in FMath library. There are alwso math examples in ue4 content examples.

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

0 answers: sort voted first
Be the first one to answer this question
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