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"

Set Collision Response on Instanced Static Mesh at Runtime

I have a custom trace channel ("Interact" in the image below), defaulted to ignore. At run time, I want to change certain instanced static mesh components to block the channel. Using the "Set Collision Response to Channel" node seems like it should work--and indeed, "Get Collision Response to a Channel" returns "Blocked" after executing the node (and "Ignore" before executing, as expected). So it seems like everything is working properly; but then a SphereTraceByChannel using the custom trace channel does not actually hit the instance. It works as I expect with static meshes, and the trace works with instanced static meshes if I set the collision in the editor rather than at run time. I was able to reproduce this in the default top-down template.

alt text

Starting the level with everything set to ignore the channel, executing "Set Collision Response to Channel" on both the static mesh (cube) and the instanced static mesh (sphere) results in hitting the static mesh but not the instanced static mesh:

alt text

Is this intended behavior for instanced static meshes? If so, why does "Get Collision Response to Channel" not match the actual collision behavior? Is there any way around this?

Product Version: UE 4.21
Tags:
actorbp.jpg (211.4 kB)
hit.jpg (23.5 kB)
more ▼

asked Feb 13 '19 at 02:29 PM in Blueprint Scripting

avatar image

RhyssPaces
6 2 2

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

1 answer: sort voted first

In case anyone else wants to accomplish something similar, here's the workaround I've settled on for now: I duplicated the instanced static mesh component for the actor, setting the altered collision settings as desired on the duplicate component, and then whenever I want to update the collision settings I instead add an instance of the duplicate ISM using the transform of the original ISM, and remove the instance of of the original ISM.

more ▼

answered Feb 19 '19 at 04:27 AM

avatar image

RhyssPaces
6 2 2

(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