Line Generation Help
-
This is the code I used to clone the square and make the line. Then I attempted to change the z order with every tap below it, but it didn't work.
This is what the line looks like. All help would be much appreciated :) -
The sooner I can get a response the quicker I can get back to work :)
-
Is the image above an example of the line going to the left?
-
It's of the line going right then left, As you can see when going right the line is clean but when going left the line has an annoying clone on it from the right side.
-
Can't you try to make a system to detect whether it's going left or right, if it's going left it won't even spawn the triangles used for right and if it's going right it won't spawn triangles for left?
-
Never mind, I've tried it and ended up with a new problem.
This is the code I now have to generate the line
But it has created this problem
Do you know how I might be able to fix it?
Thx in advanced. -
Ok I've done more code, part of it seems to work. But it is also lagging out my game after time. Here is the code
This is the outcome
I believe I'm getting close, but something isn't working right... any ideas? -
@Evolution I'm a bit confused... is there a reason your line is made of so many parts? Couldn't you just use a single graphic for each cube? If you do you can set the z order of each cube to (y × -64) I think (used 64 so cubes will have separate z orders as long as they aren't within 1/64th of a metre of each other).
Edit: had wrong z order formula. -
I've fixed it don't worry. However I need the seperate parts so that all the z layers work. If it was all one texture, upon duplication and mainly when you turn the Z layers wouldn't look right.
-
@Evolution why not? It's at a fixed angle, if you set the z layers right it should work with a single graphic per cube, right?