Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: BeamAPI getTo()  (Read 2145 times)

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
BeamAPI getTo()
« 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).
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: BeamAPI getTo()
« Reply #1 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.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: BeamAPI getTo()
« Reply #2 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.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: BeamAPI getTo()
« Reply #3 on: December 26, 2020, 03:22:20 PM »

Yeah, it was causing some weirdness with the Tachyon Lance and similar in vanilla, too!
Logged