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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to have a Static Mesh be ignored by a NavMesh?

In my game I am spawning Static Meshes into the map during gameplay. These Static Meshes are in child Blueprints; the parent Blueprint class has an arrow component and a Sphere component.. I want the player pawn to be able to path through these Static Meshes, as they are pickups,. Right now though, the player character is pathing around the pickups. Is there a way to have a Static Mesh be completely ignored by the NavMesh, so that my player character will be able to path through the pickups? Note: I am using the Top Down Template.

Thanks.

Product Version: Not Selected
Tags:
more ▼

asked May 29 '14 at 02:27 AM in Using UE4

avatar image

JonathanADaley
644 37 49 77

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

2 answers: sort voted first

Hey Jonathan,

If you set your Mesh component inside your Blueprint to Overlap All, that should be all you need. You'll need to make sure there isn't any collision set to Block the pawn on any other components as well. One last thing to check is in the expanded section of Collision Settings for each component: disable Can Ever Affect Navigation.

If that doesn't work, please provide some screenshots showing your collision settings for each element of the Blueprint (as well as the Component hierarchy) and we'll see if we can figure out what's causing the problem for you.

Best,

Ben Halliday

more ▼

answered Jun 02 '14 at 11:24 PM

avatar image JonathanADaley Jun 03 '14 at 02:51 PM

Thank you for your answer Ben. I tried changing the Collision settings in both the base Blueprint and the Child Blueprints, and also disabled Can Ever Affect Navigation; but the Pawn is still pathing around the Static Meshes. I've attached screenshots of the Component hierarchy and the Collisions settings for both the Base Blueprint and the Child Blueprint. Thanks in advance for your help on this.

Pickup Base Blueprint - Components & Collision settings Pickup Base Blueprint - Components & Collision settings

Pickup Child Blueprint - Components & Collision settings Pickup Child Blueprint - Components & Collision settings

avatar image Ben Halliday STAFF Jun 03 '14 at 04:08 PM

Hey Jonathan,

I set up an Actor Blueprint for my PickupParent Class, made a child of that for my PickupChild, and set each up as you have described above but have not reproduced the issue you're seeing. That makes me think it's something outside the Blueprints' collision. How are you spawning them in? Would you mind showing me the EventGraph for the Blueprint that spawns them, and let me know if it's the Level Blueprint or not?

I have been assuming you are using the Top-Down template for this. Is that correct? Have you made any changes to the click-to-move part of the character controller?

If you have the time, would you mind creating a new project and attempting to reproduce the same issue there? Thanks!

Ben Halliday

avatar image JonathanADaley Jun 03 '14 at 04:33 PM

Figured it out! When I changed the collision of the Blueprint that spawns the Pickup to be Overlap (save for the Trace Responses being set to Block), then my player no longer paths around the pickup. The only drawback is that they no longer path around the crates, but that shouldn't be an issue with our gameplay. Thanks for your help!

avatar image Ben Halliday STAFF Jun 03 '14 at 05:11 PM

You're welcome, glad you got it working!

avatar image JonathanADaley Jun 03 '14 at 04:22 PM

I am using the Top-Down template. I haven't made any changes to how the click-to-move part of the character controller works; I've just added on some nodes after the Move To Location function.

Thinking of spawning, that may be the issue. The pickups are spawned in by another Blueprint, which contains a Movable Static Mesh, which I set up so the player would path around it. The Movable Static Mesh is a rotating crate, which the pickup is ostensibly contained within; the player can shoot the crate and it blows up. When it 'blows up' the crate spawns in the pickup, and then the crate destroys itself.

Is it possible the navigation isn't being updated when the Movable Static Mesh is destroyed? So the reason the player is pathing around the pickup is that it still things the Movable Static Mesh that spawned the pick up is still there? If so, is there a way to update the navigation during gameplay?

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

Hey JonathanADaley,

If you change the Collision Settings of your Actor. You can make NavMesh ignore the mesh. Look under Collision in the Details Tab of the Sphere. Then change the Collision Response for Pawn & Vehicle to Overlap. It can also be set to Ignore, but you want Overlap Events to occur. Preview attached! Let me know if that resolves your issue!

alt text

Also for the Child, Disable Collision. alt text Peace

more ▼

answered May 29 '14 at 03:22 AM

avatar image

PeterLNewton
2.1k 75 37 111

avatar image JonathanADaley May 29 '14 at 04:22 PM

SilentX, Thanks for the response. I tried setting the collision to how you showed it, as well as setting everything but Pawn and Vehicle to Ignore (with leaving Pawn and Vehicle on Overlap). I also disabled collision on the Static Mesh assets, and made sure there are no collision primitives set in the Static Mesh. I'm still having the same issue. I also had the Set Actor Enable Collision node setup in a child's Construction Script; no dice. I may be able to just leave this in the game and use a Sphere Component to check for overlap with the player pawn. But for future reference I'd still like to know how to have Static Meshes ignored during Navigation.

(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