Jump to content

cloudcamaleoniv

Members
  • Content count

    2
  • Joined

  • Last visited

  1. cloudcamaleoniv

    Extrude edges via code (but with a catch)

    That helped a lot man. Thanks! Finding out this stuff was killing me: dir = ((pb.vertices[edge.x] + pb.vertices[edge.y]) * .5f) - face.distinctIndices.Average(x => pb.vertices[x]).normalized; Thanks for this man. And congratulations on the very well written API.
  2. Hi, so, I'm doing a tile based isometric game, and one of the incoming needs is to create a path, procedurally, while the player moves. Since it is a tile based game, the algorithm for it to work is not complex, but despite of the clarity of the API, I'm (REALLY) struggling to find the correct methods to do so. It all starts with a quad. It was made within the engine. The user in on top of this quad. He can only move forward, right, left or back. And so, he decides to move. Let's say he moves forward. ---------------THE ALGORITHM------------------- 1. Current Quad = The First Quad 2. Direction of Movement = Forward --- The loop --- 3. I get my Current Quad 4. Get all its edges 5. Find the edge that points to the direction of movement (?) 6. Extrude the edge in this direction (The API doesn't allow this, so I need to split into more steps) --- 6.1. Extrude the edge with 0 distance (returning the newly created edges) --- 6.2. Get the points of these edges (?) --- 6.3. Translate the points to the correct position 7. Get the new quad that was created with the extrusion (?) 8. Current Quad = this new quad 9. The player now choose other direction to move. Back to step 3 ------------------------------------------------------------- I marked with (?) the steps that I don't have a clue on how to do it. As you can see, it's only 3 steps that are missing from my master plan. Thanks =)
×