ThunderComplex,
@ThunderComplex@musicians.today avatar

I need some help. I'm trying to implement orbiting spaceship movement kinda like Eve Online. It works.. but the positions slowly drift apart as they continue orbiting, instead of remaining stable.
Anyone got any ideas?
I've already exhausted my knowledge by 1) normalizing all vectors and 2) making the actual update code dependent on delta time. This improved things a lot, but it's still an unstable system.

Here's my hacked together code: https://gist.github.com/ThunderComplex/74ddd3549cb71855d0b343d11fe5512a

ilmai,
@ilmai@hachyderm.io avatar

@ThunderComplex if you want a halfway solution between “realism” and faking it, I would suggest calculating an ideal orbit and then using each ship’s movement controller to try to follow that.

ThunderComplex,
@ThunderComplex@musicians.today avatar

@ilmai Thanks. But honestly, this bit of rubberduck debugging has made me realize that I can even get away with not even using real positions at all, thus eliminating any need for orbiting mechanics.

ilmai,
@ilmai@hachyderm.io avatar

@ThunderComplex not having to implement anything is always the best conclusion to reach!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • bevy
  • DreamBathrooms
  • magazineikmin
  • thenastyranch
  • modclub
  • everett
  • rosin
  • Youngstown
  • slotface
  • ethstaker
  • mdbf
  • kavyap
  • osvaldo12
  • InstantRegret
  • Durango
  • megavids
  • ngwrru68w68
  • tester
  • khanakhh
  • love
  • tacticalgear
  • cubers
  • GTA5RPClips
  • Leos
  • normalnudes
  • provamag3
  • cisconetworking
  • anitta
  • JUstTest
  • All magazines