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"

Change Static Mesh's Collision in Blueprint

I have the static mesh's collision set to no collision.

However I would like to change the collision to active once endOverlap has occurred with a player.

How can I accomplish this?

Product Version: UE 4.9
more ▼

asked Nov 21 '15 at 11:36 PM in Blueprint Scripting

avatar image

170 47 49 60

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

1 answer: sort voted first

What I normally do is this

  • Select the collision preset to use when collision will be active

  • Change the preset to Custom...

  • Set Collision Enabled to No Collision

Now you can use the Set Collision Enabled blueprint node to turn collision on or off whenever you want.

alt text

more ▼

answered Nov 21 '15 at 11:56 PM

avatar image

881 36 14 60

avatar image nmm131 Nov 22 '15 at 12:20 AM

My player passes through but when falling down, the collision is not being enabled.

Here are my settings, is there anything that I am doing wrong?

alt text

asdf.png (1.1 MB)
avatar image Alderbit Nov 22 '15 at 01:02 AM

Oh, you want to use the mesh itself to trigger the end overlap event. The above won't work in that case.

Instead, set the mesh collision preset to OverlapOnlyPawn. Now OnComponentEndOverlap should fire. When it does use Set Collision Profile Name to change the preset to BlockAllDynamic. Hopefully that should do it.

alt text

setcollision.jpg (151.8 kB)
avatar image nmm131 Nov 22 '15 at 01:13 AM

This is just blocking my pawn from beginning to overlap through the static mesh.

avatar image nmm131 Nov 22 '15 at 01:15 AM

I have many actors inside my blueprint that I wish to have a one way collision, is there a better way that could do this on a global scale for all objects in a blueprint actor class? They must essentially be toggle-able -> land on top of any of them there will be collision but come from up underneath one and there will be no collision to where the player can go through and land on top?

avatar image nmm131 Nov 22 '15 at 01:24 AM

Is there a way to set collision to "no collision" when coming from below the static mesh

and set collision to "active" when coming from the top or landing on the top of the static mesh?

avatar image Alderbit Nov 22 '15 at 02:21 AM

It's a little more involved, but you could do it by setting up a system of box colliders above and below the mesh to generated the overlap events which cause the collision response to change.

alt text alt text

I'd also recommend trying to re-use a blueprint containing a single mesh instead of grouping all the meshes into one big blueprint.

toggle_system1.jpg (76.7 kB)
toggle_system2.jpg (136.0 kB)
avatar image nmm131 Nov 22 '15 at 03:14 AM

This method will work better than I anticipated. I just wish there was an option in custom collision to do this. Maybe it could be offered as in a future update? Useful, thanks!!!

(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