How do I make a 3d line on a kite so that the player always has the line positioned on it?
I’m not able to position the line on the player and the kite at the same time and the line stays in the right direction with the length of the line over the distance. Is there a any 3D line extensions? I’m using a box model to make the line.
Maybe there’s another way. I don’t know about in 3D but in 2D, I would set the position to the center point between the start and end points, the angle based on angle between start and end and the width based on distance between start and end.
In 2D, I would use the following logic. IDK if it would be the same if you added the same logic to Z() for 3D
Set Line position x= (startX+endX) * .5 , y= (startY+endY) * .5
Set line angle to angle form start to end
Set line width to distance between start and end
This takes into account positioning an object by it’s center point.
That’s the closest I got. If I play with it later, I’ll share it.
Your events were missing the parenthasis and had 5 instead of .5
(it calculates the center position between the 2 objects, the average. You can use divided by 2 but then there’s the slight chance of division by zero, so, I prefer times .5)
I’d love to help but I just don’t have much 3D experience.
Instead of posting your project, you’ll get a quicker response if you post a screenshot of your events. Most people probably won’t download a project and if they’re like me, I’m usually on my phone. So, I can’t open the project.
I tried to do this but I just don’t have enough experience with 3D. I was trying to use my 2D strategy in the 3D realm, I wasn’t calculating distance and angle in the 3D world. So, it didn’t take elevation into account.
I’m not saying that’s your current issue. I’m just adding context.
IDK if you’re still stuck but I managed to get it to work. I don’t fully understand it but ChatGPT was able to help. Along with good old trial and error. I had to add a lot of extras to see the values. The project has leftover variables and stuff. I didn’t have the willpower to optimize it. The starting position needs to be changed.