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"

Top down template: walking past invisible walls

I have created a project using the top down template. I have created a line trace between camera and actor and I hide meshes that are hit by the trace by using Single Line Trace for Objects -> Set Actor Hidden in Game. I am having the following problems:

  1. The mouse hit event hits the invisible wall when it's hidden. As a result, I cannot move the character behind the wall even if it's invisible.

  2. The Line Trace hits invisible objects too, as a result, I can only hide one object at a time.

  3. Is it possible to make some objects not trigger the mouse click event? I want the character to move behind a wall even if it's visible at the moment at some occasions.

I suspect that points 1 and 2 are somehow related to configuration, I think I have he enum array for EObjectTypeQuery set incorrectly, but I can't figure it out myself. Thanks for any help.

Product Version: Not Selected
more ▼

asked Apr 13 '14 at 09:10 AM in Blueprint Scripting

avatar image

6 1 3 3

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

1 answer: sort voted first

Just to make sure I understood it correctly, you want to achieve a similar effect like in Diablo 3, right?

  1. you probably also need to disable collision of that invisible object. Try the Set Collision Enabled to a new type of No Collision.

  2. You cold give a try to Single Capsule Trace By Channel, instead of casting a line it casts a capsule with a given Half Height and Radius. (Dont forget to play with the Draw Debug Type of that node to have an idea of the size of the trace.)

  3. At Edit->Project Settings->Collision you can create new Trace Channels. Create like Ground and Wall. and set them accordingly to the objects in the map. And instead of tracing for the Channel Visible, trace for Ground. Note: BSP are always in the Visible channel, you cant change that.

more ▼

answered Apr 13 '14 at 01:02 PM

avatar image

196 13 16 21

avatar image siq Apr 13 '14 at 02:21 PM

Thanks, your answer was very helpful. How do you suppose I should go about making the walls reappear after they no longer obstruct the view? Should I just save their references in some collection and check it every tick? Or is there some better solution? Something event driven perhaps?

avatar image HRuivo Apr 13 '14 at 02:29 PM

I'm also working on a similar game and my approach would be have a BP that is a trigger and have an array of static meshes which is filled in the editor by the meshes to disappear/reappear on OnBeginOverlap/OnEndOverlap.

a basic foreach that makes them to be visible or invisible would do the trick and way more performance friendly.

(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