You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.
If you walk forward and fire a weapon at the same time you shoot yourself. Is it possible to ignore the shooter when checking for hit objects or can the ray begin a bit further in front of the shooter?...
The text was updated successfully, but these errors were encountered:
9joshua
changed the title
Sprint + Firing = Self Shooting
Walk + Firing = Self Shooting
Jun 16, 2020
9joshua
changed the title
Walk + Firing = Self Shooting
Walking + Firing = Self Shooting
Jun 16, 2020
vector.equals(pthing.intersection_normal, vector.new(0, 0, 0)) then
pthing=ray:next()
end
returnpthing
The code already avoids the first pointed thing if the ray originates from within the pointed thing. Might it be possible that the ray encounters the same object again after skipping? That's highly unlikely...
Are you using the latest version (v0.24-pre) of Gunslinger?
I cloned from the master branch 3 days ago. My version contains the code you pasted above.
It only happens when walking forward so maybe due to lag from the time the check is done to when it continues to trace?
The map is loaded as the ray advances. If the map is modified after the Raycast is created, the changes may or may not have an effect on the object.
This means that unless the Raycast object is re-created, it shouldn't detect the same player again and again. But there is a possibility of the ray originating from outside of the shooter's collision box due to lag (is this what you were saying?), which means the code linked in the previous post will not detect the player properly. Ideally, it's better to explicitly check for the player; I wanted to avoid string comparisons as they're computationally expensive. I'll see if there's a better way to check if an object corresponds to the shooter themselves.
If you walk forward and fire a weapon at the same time you shoot yourself. Is it possible to ignore the shooter when checking for hit objects or can the ray begin a bit further in front of the shooter?...
The text was updated successfully, but these errors were encountered: