check walkability in rg.toward()
added optional flag for walkability check