RaycastHit2D.normal not returning proper normal if hit object has rigidbody2D. Bug?

I’m not sure if this is intended behavior, or a bug, so I haven’t submitted it yet; but it’s definitely a big issue for the game I’m working on, as some of the surfaces I need the normal of require a Rigidbody2D.

Here’s a picture of the issue, the only difference between the squares is that right one has a Rigidbody2D on it.
1522022--87189--$fc61e91f960f6c757d91de641163c29b.png

So, would this be a bug, or just intended for some reason I can’t think of?

I’m using a LinecastNonAlloc btw, havn’t tested the other types of Raycast’s yet to see if it happens there too.

	private RaycastHit2D[] hits = new RaycastHit2D[1];
	private LayerMask groundLayers;

	void Start () {
		groundLayers  = (1 << LayerMask.NameToLayer("Ground"));
	}

	void FixedUpdate () {
		Vector2 castDist = new Vector2(transform.position.x, transform.position.y - 5f);
		Physics2D.LinecastNonAlloc(transform.position,castDist,hits,groundLayers);
		Debug.DrawRay(hits[0].point,hits[0].normal * 2f,Color.cyan);
	}

I don’t know about this, but there are issues with BoxCast and CircleCast not returning correct info (distance, point, centroid are all wrong in many cases).

I’m guessing other 2D casting methods also have issues. I would recommend a full battery of accuracy test on all 2D casting methods at this point.