I’m setting an actor’s collision to ‘Ignore Pawn’ in the Top Down template, but the pawn isn’t being ignored. When I do the same thing in the Third Person template, the pawn can walk through actors. In Top Down the pawn walks through very slowly and is getting a bit blocked. Is it broken or is it supposed to behave like that? Can anyone reproduce it?
Hey there @sharpfranklin! Welcome to the community! The issue is two fold, but primarily because the collision check for the click is checking against Visibility
so it will reflect the closest visible object to the camera where the cursor is, so your character is going to the exact location you click. This makes them seem to wiggle around inside the collision.
To avoid this you would have to adjust the Get Location Under Cursor
function inside of the BP_TopDownController
. Changing from Get Hit Result Under Cursor by Channel
to Get Hit Result Under Cursor by object
and making an array of things it should hit. I’d also recommend making a new collision channel for your group of “ignore player walk collision” objects, just so you can manage them easier and set your walk through-able walls. (You could also instead just disable visibility checks on your objects but other engine systems use visibility traces so it could cause unintended effects).
Secondly the player’s movement is based on NavMesh. If you have your walls’ navigation set to Can Ever Affect Navigation
then the player will often try to path around it if it’s too thick even if it wouldn’t come in contact with the object itself. You can see this reflected by hitting p
to see the navigation mesh itself. This won’t be obvious on smaller gaps. Hope this helps!
Thanks for the warm welcome @SupportiveEntity! I was convinced I’d found a bug, but you’re right, the NavMesh is getting in the way. Turning Can Ever Affect Navigation
off, solves the problem. Much appreciated!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.