When using “simple move to location” with a PlayerController it doesn’t get close to the desired location - not even nearly. If I click to move it needs to get close enough that there is no visual difference in the exact coordinates it received and the final position - accurate to a minimum of 2 floating points. I am using Unreal Engine 4.5.
I have setup a significant amount of functions and so forth in my PlayerController. Searching Google it seems the solution (more of a hack / work around than a solution though…) is to have a PlayerController send information to AIController which then moves the attached Pawn.
This isn’t a valid solution for me. For one thing, changing the parent class type from PlayerController to AIController ruins half my functions and it’d take a long and painful amount of work to get things half way going again. Another, I do not have the necessary functions available to me in Unreal Engine that are required to make this work and am unable to implement them (meaning I can not cast to AIController or even “Spawn AIFrom…”… anything but a Class). And third, I don’t like cheap hacks to do something I could teach a 12 year old to implement in Java when I’m using what’s intended as a triple A game engine, that is, actually move an object to the specified location.
For the sake of my sanity and the hype over this engine, please explain how to ‘Move to Location’ accurately with a PlayerController.
That code loop I linked works for me in my project to set target locations. And its pretty close. I used to have a jitter when I had it set to 1cm. But that is why I increased it to 4cms so the jitter would disappear.
You should use AI move when relying on navmesh etc.
EDIT*** In the state I posted the screenshot it actually doesn’t work. You have to link Begin Play -> Goto Dest (and break links on the Attacking?)
Hello,
Not sure it will helps you but maybe using “spawn default controller” can help
(it is needed when you want to move an actor after spawning and it works after a “cast to” on your player character) :
Simple move to location is not designed to be used like this. It’s for AI in navigation volume, you should work with object transform for such simple tasks.
For example you can use SetWorldLocation and interpolate value from old location to the new one via function like Ease
This isn’t going to somehow give ‘Move to Location’ a valid ‘target’ (AIController Reference). It will not compile without one. There is no option in PlayerController to cast to AIController, then again even AIController doesn’t have that. I’ve seen it in screenshots while researching but doesn’t seem to exist anymore (version 4.5). And yeah, I’ve disabled ‘context sensitive’.
I can’t believe an AAA engine can’t even move a player character accurately. This is the simplest most common thing in the entire development process when making a game yet they can’t do it. I’ve lost over 8 hours of development while waiting for a solution because of this and there still isn’t one.
I will try this, thanks. That’s how I’d do it in Unity but it gave the illusion that all this was setup for the developer.
Edit: Are you sure you meant SetWorldLocation? It wants a ‘Scene Component Reference’, doesn’t give me any indication as to what that actually is and the documentation is no help either. Either way, I’m pretty sure this doesn’t apply to moving a character or it’d want something related to the character.
Nor is Ease available to a PlayerController, but VInterp To will probably do it.
Oh, I believe you’re not familiar with UE framework! Check out this link Gameplay Framework in Unreal engine | Unreal Engine 5.3 Documentation
You don’t want to move your PlayerController, because it some sort of player “brain”, which handles input, some game engine stuff for networking and et cetera. Your PlayerController can control so called Pawns - they are physical representation of player character in game. I think a lot of confusion goes away after you read Gameplay Guide
I am new to UE4, yes, however I know the information there. I am trying to move the pawn with a PlayerController, not move the PlayerController. Nor does it change the fact that ‘Ease’ isn’t available to a PlayerController or there isn’t a valid target for ‘Set World Location’.
Edit: Ease is now available that I have reopened UE4? I think the engine is very buggy still. I am using Set Actor Location and seems ok.
Huh, it’s strange to think I posted a thread 20 days ago because I couldn’t make my character move, and now I have an authoritative server replicating 20 players moving around with combat/action systems with stats/UI and modifiers for status effects and Enemy AI in place. Pretty much a base for a small MMO. It’s really satisfying to know how far I got in 20 days when the same time in Unity would of had me given up in frustration and loss of interest because of the snail’s pace anything gets resolved at. This engine just… works and it works pretty **** well. Not starting a vs thing here, but for me personally I spent years in Unity and I feel more at home in Unreal after less than a month - I will never go back
Still so so much to do, but the strangest thing is I’m excited about that rather than dreading what will break next.
Hey Vaei, could you post a quick snapshot of your solution to this problem? It’s been annoying me for a day or so and all the posts I have found on this topic are pretty meh.
I’d like to know how you solved this?
For some reason I can’t get the rotation of character to be replicated when I use the Simple Move to Location function.
Hi!
In your original post you asked for an accurate alternative to “simple move to” did you ever figure out a solution for that?
I think I have a similar issue.
I’m dabbling around with unreal engine using the “Topdown example preset”, for a click to walk game.
My character preset is using the “Simple move to location” node, but it always stops exactly 0.5 meter away from the clicked location, this seems to be the default behavior and is a problem. Someone sugested I should lower my Acceptance radius. Does Simple move have that somehow? or can I use Move to Location on a player controlled character as well? I’m confused ^^,