ply:GetAimVector() doesn't get the real aim vector

I’m having an issue using GetAimVector() while a player is in a seat ( ex: airboat seat).
I have made some crappy mspaint pics to illustrate the problem.

The black line to the left illustrates a wall.
The red laser is the players real aim vector (where the player really is looking at).
The green laser is the aim vector I get when using GetAimVector().

When the seat is snapped to the default angle there is no problem using GetAimVector().

When the seat is tilted it will not return the correct aim vector.

I have tried to find a way to compensate it but failed.

Here is the code
local Dir = self.Entity.User:GetAimVector()

local plyPos = self.Entity.User:GetShootPos()

local trace = {}
trace.start = plyPos
trace.endpos = plyPos + (Dir * 50000)
trace.filter = { self.Entity, self.Seat }
local tr = util.TraceLine( trace )
local hitpos = tr.HitPos



self.DotLaser is a sprite.
self.Entity.User is the player that’s currently using the seat.

Any ideas?

GetAimVector returns the 3d vector in relation to your mouse position. If your mouse is visible on the screen, it will use that as its calculation. If your mouse is not visible, it will sit in the center of your view, and calculate at the center of your crosshare. I would use ply:GetEyeTrace().HitPos instead of your function. I think the 50000 you supplied in the calculation is too large for the trace to correctly calculate.

The problem is that it seems like it doesn’t return the centre of the crosshare when the player is inside a vehicle (and the mouse is still not visible). I will see if I can use GetEyeTrace.
Using 50000 as trace length shouldn’t be a problem. My guess is that the min length is 65535 (unsigned short), going to try with a shorter trace anyway.

Tried with a shorter trace (500) and it didn’t make a difference. =[

One more question.
Am i able to use a filter when using GetEyeTrace?
If I can’t use filters I wouldn’t be able to use it.
Didn’t find any way to apply filters on GetEyeTrace on the wiki.

If you want filters, look up util.TraceLine and a TraceRes structure