Yup, you're right. In industry, that's called a near miss. It's treated with the motions as though you were hit by that car, but none of the consequences are enacted, since nothing in fact happened (YMMV). Basically, it's a freebie: lessons are learned without anyone getting hurt, which is about as good as it gets.