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.

Draw wire-like lines on screen.

Discussion in 'Modding' started by Phoera, Sep 22, 2016.

  1. Phoera Senior Engineer

    Messages:
    1,713
    Hello my fellow engineers.
    Is that any way avaliable to draw 3d-line between two blocks?
    better if i can control colors of this.

    no physics, just graphic.
     
  2. Digi Senior Engineer

    Messages:
    2,383
  3. Phoera Senior Engineer

    Messages:
    1,713
  4. Digi Senior Engineer

    Messages:
    2,383
    When you draw stuff from MySimpleObjectDraw or MyTransparentGeometry they will only live for one update frame, so you need to call them every update frame.

    Optimal would be to call them in the session component's Draw() method which gets called even while the game is paused and also has the advantage of having up2date position matrices so drawn stuff won't appear to lag behind when stuff are moving.

    And other stuff, distance from camera would be nice to check to not draw things really far away that would just waste performance.

    The MyParticlesManager only needs to be called when you need the thing to be spawned (not relevant to this topic, just saying).
     
  5. Anonymous Blackness Trainee Engineer

    Messages:
    9
    I
    I know this is an old post but sprites drawn with MySimpleObjectDraw and MyTransparentGeometry, are they only drawn on the local client or do they appear on all clients connected to a server? I have some things I only want the local user to see and others I'd like all clients to see.
     
  6. Digi Senior Engineer

    Messages:
    2,383
    Local machine only.
    Scripts run for all machines so if the conditions apply then everyone will draw them on their own without needing to do network sync.