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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How can i set so that my AI cannot see through my own Object Types?

Hi, i have been working a bit on a wardrobe that the player can open. And for that wardrobe i have created two new object channels for the game, one for the door and one for the mesh surrounding the door. I have this so that i can set that the door and the surrounding mesh will not collide with each other.

But i have run into the problem that the AI's sight passes through the meshes with my new object types and is able to see the player pawn. I did some more testing and noticed that the AI can see through all objects that are not WorldStatic object types. I'm using the AI perception component to handle sight for my AI.

Is there some way to add more object types that the AI cannot see through or will i have to figure out another way to make my wardrobes? As i don't want the AI to be able to see through the wardrobe.


Two images of the wardrobe collision settings. The AI can see through these, if object type is changed to WorldStatic, the AI cannot see through them.

For the surrounding mesh. http://i.imgur.com/augLbHY.png

For the wardrobe door. http://i.imgur.com/hX1Jivc.png

Product Version: UE 4.9
Tags:
more ▼

asked Nov 01 '15 at 11:30 AM in C++ Programming

avatar image

Solicio
200 54 53 64

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi Solicio, as far as I know there is no way the perception system can recognize if an object is in front of the AI. You need to test it on your own. The easiest way to do this is to make a LineTraceByChannel. It's really straight forward to use it. Hope I could help you ;)

Conan

more ▼

answered Nov 01 '15 at 10:43 PM

avatar image

Conan
69 5 6 9

avatar image Solicio Nov 02 '15 at 09:33 AM

I suppose i could do a line trace to check visibility, but i felt that it was kind of pointless to have the AI perception component handle sight if i had to do even more line traces for each sight to check something basic like visibility.

(comments are locked)
10|2000 characters needed characters left
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