robhol Posted February 15, 2009 Posted February 15, 2009 OK, so I could use a function where I give two points (X,Y,Z) and a value (e.g. percent) and get a point back that's x% "on the way" from point A to point B. That probably didn't make too much sense, so please ask if you're wondering what the hell I'm babbling about.
Lordy Posted February 15, 2009 Posted February 15, 2009 you mean like a point just a percent between two points starting from first? I dunno if this would work but I'd try it first function getPoint(X, Y, Z, XX, YY, ZZ, percent) local newX = (XX - X) * percent + X local newY = (YY - Y) * percent + Y local newZ = (ZZ - Z) * percent + Z return newX, newY, newZ end Something like this? I haven't tested it but it should work Edited it a bit as you pointed to my error
arc_ Posted February 15, 2009 Posted February 15, 2009 Also, the "percent" parameter is a number between 0 and 1 in the above code (not 0 to 100).
50p Posted February 15, 2009 Posted February 15, 2009 robhol, I don't know if I get you... but have you tried this http://development.mtasa.com/index.php? ... enPoints3D ?
robhol Posted February 15, 2009 Author Posted February 15, 2009 Lord_'s solution worked, the topic can be closed.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now