Capsule component lagging when using AIMoveTo

Im currently working on RTS in space. All ships are with fixed Z value. When ship is created its placed on a plane (Floor) with collision set on blocking. Every ship is moved by selecting it and clicking on the floor and then the event is firing wich uses AIMoveTo. ![Screenshot_8min.png|971x402](upload://wZ4GcuApVJirFUd2z2xr1xcJyiC.png) When ship is placed it interacts NavMesh ![Screenshot_5min.png|1598x844](upload://qgmcmBKMNVW0upHWxW6B1gyvlI8.png) When I try to move ship this happends Every ship (BPShip) is a character with capsule, skeletal mesh, arrow and character movement inherited. ![Screenshot_9min.png|275x275](upload://yvdT61C5ktWGC1JuKPVkLUj1uGy.png) ![Screenshot_1min.png|1919x1030](upload://dm3wlP8BWrboGXITgbZp8WDoq3X.png) Ive added static mesh with ship model and collision box.

This is a collision setup

Navmesh setup
I`ve tried a lot of things to get rid of this lagging:

  1. Ive raised the Z value of static mesh above the capsule by 200 units. This helps and ship is moving in straight lines but it didnt interracts witn NavMesh
  2. I`ve tried to set capsule collision to NoCollision but then the ship is falling under the floor. This is very confusing because static mesh itself has blocking with map boundaries.
  3. Ive played with collision settings of capsule and static mesh and it didnt help

I want ship to use the navigation


use such an approach/don’t let your ships mesh influence the navmesh. If you use a capsule component as root for movement only that should interact with the navmesh. Else if I would need to guess as to what happens in your video it seems to me that since only the capsule component is used for navigation and the ships removing the navmesh around the capsule, no way is found. If you want the ships to avoid each other use RVO Avoidance or raise the radius of the capsule component to encompass the whole ship.

As soon as you use a capsule as root component for movement (this is required to use the build in AI movement nodes like “Move To”) only this capsule will influence the movement, collisions of the mesh will be ignored as far as movement is concerned, so your static mesh will never collide with any map boundaries.
[HR][/HR]Capsule component as collision for movement is mostly used for humanoid meshes. For what you’re doing you might wanna think about implementing your own movement with the ships mesh collision as collision for movement (but of course then you can’t use the build in nodes like “Move To” since those only work with a capsule component as root and therefore would have to implement those on your own).

**chrudimer, **thanks for reply.
I did what you proposed and it didn’t help (you will see in video below)
In video I reshaped capsule so that it would contain static mesh in it. Then I show collision settings for capsule and static mesh. Notice, that I have custom categories for capsule (PawnCapsule) and for static mesh (ShipMesh) and I set collision setings in a way in which PawnCapsule ignore ShipMesh and ShipMesh ignore PawnCapsule. Then you will see that when game starts ships moves around freely but they didn’t interact with navmesh and then I move ship to the bottom of capsule and play again and now ship mesh interacts with navmesh.

I tried lots of different sizes of capsule and standard collision settings with no result.

I quite can’t understand how navnesh interacts with capsule. Say if I create empty character without static mesh would it interact with navmesh? I think it should. Then why in my case capsule can’t effect navmesh.
Maybe there is a setting which corresponds to height on which static mesh is detected? Say if static mesh (it’s collision box) is above 100 units then do not calculate it in navigation…

Here you are talking about implementing in c++? If so, then how do I get navigation data form unreal and should I use character as a base class or I should use pawn class?

I don’t know how to set the capsule component so that it dynamically affects the navmesh generation, and I don’t know whether or not that is possible without changing the engine code.

If you want the ships to avoid each other, you can use RVO Avoidance, don’t set the static mesh to affect the navmesh.…crazy-movments

I implemented it in blueprints for my vehicles. You would use a pawn, since the character has character movement tied into it.
Basically you would add a movement component to your pawn (like floating pawn movement) and then use the “Find Path to Location Synchronously” node and let the ship move along the returned path points.
You would still need to use RVO Avoidance if you want the ships to avoid each other. With this custom movement you could use your ships mesh collision as collision for movement instead of having a capsule collision. But in your case I think I would first stick to character movement with RVO Avoidance.

Chiming in.
the ships are a skeletal mesh. Could you maybe have something going on with that as far as the anim BP goes, or anything similar that could be causing the issue?

Also, in the last video the collision issue is that you are colliding the mesh of the ship with the plane you are clicking on.

**MostHost LA, **BP not have any skeletal mesh or animation. Its just static mesh. You can see it in video. So that is not the case, i assume

Yeah, that was my mistake. I wanted to show jerky movement of ships as it was in first video but moved static mesh to low and collision of static mesh collided with floor.