Line trace not accurate bug?
I have a line trace by channel being used in a game. Initially I had two skeletal meshes under the same parent component on my character. One was for the start location, one for the end. Both were lined up completely on the x and z axis, and only had a different y axis in order to get a further location. The distance was 9999 on y. I noticed that with a reference (tip of iron sight) the line trace was always sloping down, and missing the target. I double checked everything and indeed there was a large difference between the start and end, in relation to the direction of the gun. I tried also getting a forward vector and it did the same thing, it would just never hit the mark. I ended up raising the z axis on the end socket about 500 units, and it's much more accurate now. This could be an issue due to using a separate camera that is placed on the rifle, and switching to that one when zooming. However the line trace (sockets all children of the aiming rifle) were nowhere near straight or where the rifle was aiming. Bringing the Z axis up was a fix, but I'm not sure why I was having this issue. It may not be a bug, maybe just an awkward and badly implemented system for aiming and shooting on my part, but I don't see any reason for this to be happening. Any feedback would be useful :)
Follow this question
Once you sign in you will be able to subscribe for any updates here