Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Commit

Permalink
Fixed a raycast distance bug
Browse files Browse the repository at this point in the history
  • Loading branch information
razzie committed Jul 18, 2019
1 parent edc6763 commit d9349f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Client/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static void GetAimCoords(out Vector3 position, out Vector3 target, float
{
position = API.GetGameplayCamCoords();
var rot = API.GetGameplayCamRot(2);
var forward = RotationToDirection(rot) * 10f;
var forward = RotationToDirection(rot) * distance;
target = position + forward;
}

Expand Down
2 changes: 1 addition & 1 deletion Client/Ropes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private static async Task Update()
else if (Permission.CanDo(Ability.RopeGunStaticObjects))
{
player = GetPlayerEntity();
Common.GetAimCoords(out Vector3 rayBegin, out Vector3 rayEnd, 128f);
Common.GetAimCoords(out Vector3 rayBegin, out Vector3 rayEnd, 30f);
var ray = API.CastRayPointToPoint(rayBegin.X, rayBegin.Y, rayBegin.Z, rayEnd.X, rayEnd.Y, rayEnd.Z, -1, player, 0);

bool hit = false;
Expand Down

0 comments on commit d9349f3

Please sign in to comment.