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"

Line Trace for custom Object Type always false

If I do a line trace for a custom object type, the result is always false, even though it should have hit. As soon as I change back object type and the line trace object type to pawn, the result is true.

Expected: custom object types should also return true if the trace hits, just like the trace reacts to default object types.

Repro: Go to project settings, add a new collision object type (for this example: player) Add a pawn to the scene, change capsule component -> collision -> object type to "player" Do a line trace from the camera to that object, with object type array added "player" See that the result is false Now change pawn object type back to "pawn" Set line trace object type array also to "pawn" and do the line trace again See that the line trace returns true.

Product Version: UE 4.8
Tags:
more ▼

asked Aug 06 '15 at 06:01 AM in Bug Reports

avatar image

Blue669
261 29 39 54

avatar image Ben Halliday STAFF Aug 06 '15 at 06:05 PM

Hey Blue669,

I tested this in 4.8.3 the way you described, and it returns true when i hit the pawn with the line trace. I have a couple questions to help clarify what I might be doing differently than you:

  1. Are you using the LineTraceForObjects node?

  2. For the Object Types input, did you Promote to Variable and give it a single element of Player?

  3. Is the Default Response for the Player Object Channel set to Block?

  4. Does this happen in a new project as well, or only in your current project?

Is there any additional information to help reproduce this? Would you mind uploading your test project somewhere and getting me a download link?

Thanks!

avatar image Blue669 Aug 06 '15 at 06:35 PM

Thanks for your response. Yes, default is set to block. Here is my setup: alt text

Left: the line of sight check trace. Right: collision from player character capsule

linetrace.jpg (327.8 kB)
avatar image Ben Halliday STAFF Aug 06 '15 at 07:52 PM

Hm, I tried setting it up this way as well, in a BTService, but still don't get false. Can you set this up in a new test project and upload that somewhere for me?

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

3 answers: sort voted first

Heya Blue,

I haven't heard back from you yet, so I'm resolving this for now. If you get the opportunity to build a small test project in which this same problem occurs, please upload it somewhere and get me a download link to check out. Thanks!

more ▼

answered Aug 10 '15 at 08:49 PM

avatar image Blue669 Aug 12 '15 at 07:38 PM

Do line traces check for any other thing besides this collision object type? What else could cause the line trace to fail even if it does hit the object?

avatar image Ben Halliday STAFF Aug 12 '15 at 08:54 PM

The Line Trace for Object should return everything marked as the Objects assigned to it, minus the Actors assigned to Actors to Ignore. Unless the Actor you're trying to find is in that Actors to Ignore list, the line trace should not be failing.

I can take a look if you want to send me your project via PM on the forums, or if you can reproduce this in a smaller test project.

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

I had this same issue with a sphere trace. Rebooting the client fixed it. I think something wasn't saving with the project settings or something, not too sure. Fixed though...

more ▼

answered Sep 24 '15 at 02:56 AM

avatar image

Cory.J.Black
19 6 4 7

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

I just wasted an hour of my time with this exact issue. Rebooting the client fixed it as well. Amazing. Thank you Cory.

For epic - The bug seems to happen when you:

Add a CapsuleTraceForObjects (example) to your BP, but you don't have a custom channel type yet. Go to project settings and add a new channel object type Go back to BP you can't select your new channel type yet. So Compile. Now select the custom object type.

Broken.

Restarting the client fixes it.

more ▼

answered Aug 13 '18 at 02:30 AM

avatar image

Meneleus
6 2 2 5

(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