mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use correct target distance for ray cast in beam system
This commit is contained in:
parent
2d658e67d4
commit
eae7f06165
@ -187,7 +187,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
// Finally, ensure that a hit has actually occurred by performing a raycast.
|
// Finally, ensure that a hit has actually occurred by performing a raycast.
|
||||||
// We do this last because it's likely to be the
|
// We do this last because it's likely to be the
|
||||||
// most expensive operation.
|
// most expensive operation.
|
||||||
let tgt_dist = pos.0.distance(pos_b.0);
|
let tgt_dist = beam.bezier.start.distance(pos_b.0);
|
||||||
let beam_dir = (beam.bezier.ctrl - beam.bezier.start)
|
let beam_dir = (beam.bezier.ctrl - beam.bezier.start)
|
||||||
/ beam.bezier.start.distance(beam.bezier.ctrl).max(0.01);
|
/ beam.bezier.start.distance(beam.bezier.ctrl).max(0.01);
|
||||||
let hit = hit
|
let hit = hit
|
||||||
|
Loading…
Reference in New Issue
Block a user