# Obstacle avoidance in Bezier Curves

I use an A* algorithm to find a path voiding obstacles. On obtaining the path it would be a good idea to reduce the number of points. Then I would like to typically do a spline interpolation or Bezier Curves to find a smooth path but is it not possible that post smoothening my character bumps into an obstacle? If not possible then why and if it is possible, then how do I avoid it?

• Hi, and welcome to Game Development Stack Exchange! Check out our tour to see how we work here. If I understand correctly you're looking for having a smoothed or curved out path based on an A* result that doesn't bump into obstacles, right? – doppelgreener Jun 2 '17 at 12:47
• Yes, that is exactly what i am looking for. But I have a concern that as i smooth it out it might bump into the obstacles since I am thinking of using splines for that purpose – user254545 Jun 2 '17 at 12:52
• Usually A* produces the shortest straight path between obstacles, so there isn't much to "smooth" (it's straight). Are you looking to make the characters take a slightly-less-than-optimal path? It may help to express the situation you're in & what kind of effect you want to create. – doppelgreener Jun 2 '17 at 12:54
• @doppelgreener OP simply means he/she doesn't want the angles beween pathing points to be hard multiples of 45 or 90 degrees, during motion. Splines or Bezier curves would, as rightly suggested, help avoid such artifacts. – Engineer Jun 2 '17 at 12:55
• @ArcaneEngineer They might mean that, but I'm not presuming 45/90 degree turns are even a thing -- like imagine Starcraft, the "shortest path" necessarily involves moving diagonally, close to walls, up to the corners of ramps, etc. – doppelgreener Jun 2 '17 at 12:56