Seems simple. Your Look At Rotation has Start and Target twisted. It starts from the Hit Location (Where you bullet hits the wall/player or what ever) and it’s target is your Characters Forward Vector Multiplied by 100 + the Socket Location.
Look at the screen you posted from the other guy. The Hit Location is the Target (which makes scence) and the Start is that weird Position made up from your Forward Vector and the Socket Location. Otherwise it looks from the hitlocation at you and not from you to the hitlocation (:
Hm no, i guess because something is wrong with the Vectors you use. You start the line trace from the mouse position. So maybe the mouse is top left when you click. Have you tried just using the camera and character to line trace?
You could do something like that to let the linetrace begin at the center of the Camera:
For a more specific answer i would need to know what exactly you want to achieve (an ingame screenshot would be helpful ,because i don’t know if this is first person or third etc.)
When you say that your project is third person, do you mean:
That it is an over the shoulder style game where the character never rotates separately from the camera
It is an over the shoulder style game where the Character and the camera can be controlled separately (So that the view is not always behind the player)
Is it a top down style shooter where the character rotates to follow the mouse?
Is it a top down where the character is controlled through inputs in the keyboard/controller and the angle of fire has nothing to do with the position of the mouse?
Is it a top down with a click to move system?
Is it something else?
All of the above could be considered third person and an answer to this could help narrow down what sort of setup you will need to get a more accurate line trace.
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.
You control the movement with the keyboard and the crosshair (for shooting and attacking in general) with the mouse, the character always looks in the directions of the mouse. So it’s like number 1
If the cross hairs are in a fixed position you could use the “Convert screen location to world space” node and simply input the position of the cross hairs. If the cross hair’s position is determined by the mouse you can use the mouse position with the “Get mouse position” node and plug it’s X and Y positions into the “Convert screen location to world space” node. I hope this helps.
The following is an example of a line trace that shoots straight out from the position of the mouse.