ox_lib icon indicating copy to clipboard operation
ox_lib copied to clipboard

[Suggestion] Add var to lib.raycast.cam(FLAG, IGNORE, DISTANCE)

Open iafondo opened this issue 1 year ago • 2 comments

having to change stuff due this not having the option of taking player head coords as mesuring point of the raycast because this will work well when player is in first person but sucks when 3rd(comes out short due camera pos changing), adding an option so it asks if head is the root location a simple true or false would be great so you can choose to have always the same pos where the raycast is spawning.

lib.raycast.cam(FLAG, IGNORE, DISTANCE, PLAYERHEADCOORDS BOOLEAN or RayRootPos)

iafondo avatar Mar 18 '24 03:03 iafondo

I simply haven't been bothered to add more to the module, but raycast.cam is from the camera - a different function would needed for using the head as a starting point.

thelindat avatar Mar 18 '24 03:03 thelindat

I simply haven't been bothered to add more to the module, but raycast.cam is from the camera - a different function would needed for using the head as a starting point.

also the comparation of the 0.0 it was 0.05(been playing with the value) due to some jitter that moves the object from the mouse i guess since im calling it almost every frame

iam previewing a boombox before creating the actual object btw (after thinking going to change from player head to player pos since player idle movement isnt the way to go)

i fixed it, not exacly like it would be by a pro but it works as intended(my guess as you said would be to make a totaly new function for raycast.ped): image git1

iafondo avatar Mar 18 '24 04:03 iafondo