'Move to Location' offset issue in Behavior Trees
Hi, I'm working on grid based movement in my game. I'm using the camera as the default player character, while having all the player controlled characters and AI characters being controlled by AI controllers. Until recently, I had used the default blueprints to handle the movements. Since I'm using AI controllers, I could use the 'Move to Location' to let my characters reach the exact destination, unlike the 'Simple Move to Location' which always has an offset. So here's a screenshot of what I've been doing before I got into Behavior Trees.
You may notice that I'm using Behavior Trees here as well. But that is only to check if it has reached the Movement goal. The actual movement is handled from the outside blueprint as shown in the screenshot.
And everything was working perfectly, as seen below. The units are moving to the center of the grid, which is what I want to happen.
Today, I tried putting the movement code inside the blueprint. Initially I used the 'Move To' task inside the Behavior Tree. In spite of acceptance radius being set to low values like 0.0 and 1.0, the character was not reaching the exact destination point. Here's a screenshot of that:
So thinking that this movement might be handled similar to 'Simple Move to Location', I made a new task for movement. I got my AIController class and used 'Move to Location', with the same conditions as my previous Blueprint based settings. Low acceptance radius, and no overlap conditions.
However I'm still facing the same movement offset issue. I'm using the same code under both conditions, yet the results are different. Is there any way to get the 'Move to Location' working inside Behavior Trees? Or am I doing something wrong with the code here?
asked Jan 22 '15 at 06:30 AM in Blueprint Scripting
It's a known issue and it has been fixed in 4.7. Please give it a try once it's out, or try using latest 4.7 preview build, and let me know how it went.
answered Jan 22 '15 at 09:48 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here