Horrendous mouse lag in packaged game

I have a top-down shooter where I use mouse to aim player so you point in direction of mouse cursor. I have a navmesh which ideally needs to be dynamic because there are doors which can block doorways. While playing in editor enemies spawn in and attack player, I can then freely aim and shoot them. This is all fine and dandy in editor.

Now here’s where it makes no sense at all…

When I package game in development/shipping, as soon as there are a few enemies spawned my character cannot rotate itself properly as you can see in video. Note: this was not an issue in 4.5.

And this ONLY happens when:

  1. A mouse button is down (left/right/middle).
  2. There are 5+ active AI characters ON navmesh

If I then set navmesh rebuild at runtime to false and then package it again, my aiming works again. I have no idea how a dynamic navmesh can affect mouse input but it does! Obviously with this setting set to false my enemies think they can run through doors, not exactly ideal.

https://www…com/watch?v=lDWtLLFruiY

My guess would be you have some undesired navmesh rebuilding happening. Could you post a video of issue with navmesh debug drawing enabled? You’ll need to use an unpackaged game for it. And yes, I know you don’t experience issue in editor, I just want to what’s happening in terms of navmesh generation.

Cheers,

–mieszko

Hi Mieszko,

You’re right about it being caused by navmesh generation but it still makes no sense (not to me) that problem only happens when I’m holding down a mouse button and it doesn’t occur in editor.

In first part of this video you can see my enemies create holes in navmesh for other enemies to avoid which is done by setting 'can ever affect navigation' = true on one of components. I like enemy behaviour because of this, otherwise they all just go in single file.

second part of video shows packaged game and how navmesh generation messes things up.

At moment it just seems that any mouse button down + navmesh generation creates lag getting current mouse position. And considering it wasn’t an issue in 4.5 it feels like a new bug.

If mouse cursor is set to show on player controller or set to true in blueprint, it will cause massive mouse look lag when there are tons of AI on screen. If you make sure mouse cursor is always hidden, then mouse look lag goes away.

Hey ,

We’ll be looking into your issue on your other post, here:

Thanks!

Hello, also experiencing this in 4.12.5

to people looking at this and having problems / lag with mouse click drag

more info can be found here…