Raycast hit.point is returning wrong

First sorry for my english, I’m searching this bug for 2 days.

I have a video about this problem. I’ll attach 1

I just want to make bullet holes. When I fired creates a bullet hole but in different position.

I tried everything… i can’t resolve this problem.

RaycastHit hit; 
		//Vector3 fwd = Kamera.TransformDirection (Vector3.forward);
		Ray ray = new Ray(Kamera.position,Kamera.forward);
		if (Physics.Raycast(ray,out hit,10f)) {

			Quaternion hitrotation= Quaternion.FromToRotation(Vector3.up, hit.normal);
			Debug.Log (hit.point);


Your raycast may be hitting a collider attached to the player, be sure that it is ignoring all the player and gun layers!

That is my 2 cents, good luck!

Resolved !

Problem is the child of the prefab :slight_smile: