Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: xenoargh on December 26, 2020, 02:45:25 PM

Title: BeamAPI getTo()
Post by: xenoargh on December 26, 2020, 02:45:25 PM
I've known this was bugged for quite a while but I thought I'd note it's bugged. 

Always returns the BeamAPI's end-point as if the end-point is at maximum length (maybe that's getting reset after it causes damage and EveryFrameCombatScript can't catch it, idk).
Title: Re: BeamAPI getTo()
Post by: Alex on December 26, 2020, 02:48:10 PM
It returns the beam endpoint after impact + 1 frame's worth of beam movement, iirc. In the next release there'll be beam.getRayEndPrevFrame() to get the position you actually, generally, want here.
Title: Re: BeamAPI getTo()
Post by: xenoargh on December 26, 2020, 02:52:47 PM
Right on.  Thanks for fixing that, I finally took at look at that over here in something I finally got around to messing with and was like, "oh, that's kind of ... not going to work like I thought", lol.
Title: Re: BeamAPI getTo()
Post by: Alex on December 26, 2020, 03:22:20 PM
Yeah, it was causing some weirdness with the Tachyon Lance and similar in vanilla, too!