I’m trying to get the player character to move to wherever the cursor is located, but so far the only method I’ve found results in jerky movement and abrupt stops when the cursor passes over an object or a wall. I assume this is because the character is unable to move to that location, but completely preventing the character’s movement is unnecessary because the player will just collide with any objects or walls that they cannot pass. So, is there any way to have the character just move directly toward wherever the mouse is located? I’ve tried to get the cursor’s location and send the character to wherever that is, but I can’t find a way to make it connect in the blueprint.
Which version of the Editor are you using? Also, would you be able to upload a screenshot of the blueprint that you’ve set up for this character movement? The more descriptive information we have, the better.
Looking forward to hearing from you!
I’m using version 4.7.5
As for the blueprint, I had been using the top down sample as a reference. But the problem with that blueprint is, whenever the cursor is over an object or wall, the character abruptly stops moving. So I’m wondering how one would construct a blueprint that would prevent that from happening, or simply bypass the problem altogether by simply allowing the character to move directly to the cursor, rather than the location underneath the cursor.
It’s less of a question about an existing blueprint and more a question about how I would go about constructing said blueprint. Or modifying the top down sample’s blueprint so that it won’t jerk or abruptly stop when the cursor’s over objects or walls.
If you set the collision preset to ‘invisiblewall’ it makes the movement behavior a bit different. Is this more of what you’re looking for?
Click on the wall that’s causing an issue, under ‘Collision’ there is a drop down for ‘Collision Presets’ and that’s where you’ll find ‘InvisibleWall’.
So I don’t know for certain how to do this, but you probably want to be moving the character no exactly toward the mouse cursor, but toward the last point that the cursor was on the nav mesh. I’d probably start by messing around with “get hit result” and using the “project point to navigation” to move around a marker or something that the pawn can move to.
I haven’t heard from you in quite a while. For recording and tracking purposes, I must close this thread at this time. If you happen to still have any unanswered questions regarding this specific topic, please do not hesitate to reply to this thread.