Talk:Wall Smoothing/Implementations
Hey, I need some help with wall hugging(my question is here because I base my wall smoothing implementation on wall smoothing). I am using PEZ's wall smoothing code to hug walls. The only differences being that when I call the method I use getHeadingRadians() instead of absoluteBearing and I also removed -Math.PI/2*direction from the variable goalDirection. My problem here is not when it hug the walls clockwise(it hugs them perfectly), but when it tries reverse direction by going anticlockwise. It seizes up and oscillates between a few pixels. Thanks in advance --Khanguy 21:44, 10 April 2011 (UTC)
Hmm, kind of hard to say without seeing the code. My guesses would be your back-as-front method is messed up (you have right angle to move in but aren't moving that way correctly), you're not calculating current direction correctly, or you just lost some direction-sensitive piece of logic in your adaptation of the code. Can you draw (or even just print out) the angles that are being considered, like in this YouTube video? That should offer some clues. --Voidious 02:01, 11 April 2011 (UTC)
- [View source↑]
- [History↑]
You cannot post new threads to this discussion page because it has been protected from new threads, or you do not currently have permission to edit.