Hi Chris, i have the problem that i need my character to go "exactly" to the Walk-to-marker i have set in the hotspot. because then there will be played a sequence of overlapped spine animations that need to be played exactly pixelaccurate to the point. but the character is everytime some pixels of, changing randomly its position around the marker.
my movement settings are:
destination accuracy: 1
pathfinding update time: 0
vertical movement factor: 0.7
so i thaugt i could add just a object: teleport node into my hotspot but that doesn´t change anything.
do you have any suggestions?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
At what point are you teleporting? You could instead use the Object: Transform Action to smoothly transition the character exactly there after attaching a Moveable component to them.
However, you can also check Retro-mode movement? in the character's Inspector to get pixel-perfect movement. See the Manual's "Retro movement" chapter for more on this.
Hey Chris! Very long time not hear... I'm now working on a new game, MIGHTY 1990, which is in low res pixel perfect. And I'm noticing some "not-so-perfect" accuracy when "moving to point". For instance, my marker has a transform X of 1.15, but the player stops at 1.140345, which is about one pixel earlier. The pivot is correct, I checked the transform of my marker and the transform of my player... one is at 1.15 (marker), one at 1.14 (player).
My character has "Retro-mode movement?" checked.
The Action is a Character Move to Point with: Pathfind? (NO), Ignore Gravity (YES), Wait Until Finish? (YES), Copy Marker angle after (YES), Minimum distance (0), Enforce time limit? (NO).
No colliders or rigid body attached to my player.
Destination accuracy is 1, and "Try to be super accurate" is checked.
AC v1.79.1
Any clues? Am I missing something naive?
Inside the Char script's PathUpdate function, replace:
with:
and:
with:
Does that resolve it?
Yes, thanks. That way my character move to the exact pixel I want, thanks!
Should I extend the class and override the PathUpdate function to avoid the problem returning again if I update AC?
I guess it'll mean also change NPC and Player classes though... or is there another way to handle that without changing source code?
If the change works I will incorporate it into the next update.
Hey Chris, back again to the super pixel perfect issue...
So, the change above works, HOWEVER, I noticed that if the player is ALREADY very close to the marker, it doesn't move. Which, on a pixel perfect game, is an issue. I want my player to move even just 2 pixels from the initial position if needed. Is there a workaround for that?
Thanks a lot!
What physical distance does 2 pixels equate to?
If you meant Unity Engine measure, the two Navigation markers are 0.05 part (i.e. one is at X = -1.00 the other is at X = -0.95, which is 5 pixels in my game settings.
The 2 pixels was just an example, but it could actually happen.
My game resolution is 480x270, and some items or animations should perfectly match the background, that's why even 1 pixel out of place, is very noticeable.
What you suggested me some weeks ago, is working good when moving from a marker to another, if they are a bit far away.
Yesterday I noticed the problem when moving from two markers that were just 0.05 Unity Engine units apart.
This is with the Character: Move to point Action?
Open up ActionCharPathfind and replace line 138:
with:
Yes, it works that way. Thanks a lot.