Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Is there a way to detect planets (only) from a distance?

Discussion in 'Questions and Suggestions' started by AirplaneFood, Nov 28, 2019.

  1. AirplaneFood Apprentice Engineer


    I'm suuuper new to the whole programming thing, but I just wanna know if there is a way to detect planets, and only planets, from a large distance? I know you can probably do it via detecting voxels because the sensor block can do this, however it also detects asteroids which I do not want it to do. I was thinking there might be a way to detected the gravitation field of planets from far away, (and by far away I'm talking.. maaaybe 10,000 KM or more...) but I am not sure.

    Does anyone know?


    ~Admiral Yu
  2. Malware Master Engineer

    It depends in what context.

    In the programmable block, the answer is no. There's no radar blocks, no gravitational sensor blocks - and thus, the PB can't do it. You can detect planets long-range with camera raycasts, but they will detect anything else in the way as well - and the further away, the longer the camera charge time.

    For mods, then probably yes. While I'm not 100% certain as I haven't done it, I'd be very surprised if you can't.
  3. AirplaneFood Apprentice Engineer

    I should clarify, I'm making edits to a warp drive mod, and one of the things I wanted to do was make it so it would go faster or slower depending on your distance to a planet, so the closer you got to a planet, the slower you would go and vice versa. Since right now its just a set speed it accelerates to. But yeah, I am unsure of how to accomplish this in the script.
  4. Cetric Junior Engineer

    Just as a note on the side: if you decide to ignore asteroids, aren't you in danger to crash into one while you are traveling by warp speed to a planet you detected? Especially when you have a world which have them spawning as you go. I had a couple of incidents with ships on autopilot colliding with asteroids this way, autopilot did not avoid them (suppose they spawned right in front). And this without warp speed. Warp or anything much faster than standard speed will mean more collision risks.
  5. mojomann71 Senior Engineer

    @Cetric I could be wrong but I think they (Keen) said a long while back when the warp is engaged the system takes into account anything in the way and diverts the ship so it doesn't collide with asteroids, debris, etc.. Of course, with planets, it will not let you warp into gravity wells so you are protected from getting pulled into a planet.