View Single Post
02-12-14, 06:53 PM   #30
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Nimhfree View Post
Since you say that you have to place the buttons in a fixed interval on the path, why can't you just compute the position on the path for where the button is to be placed, and then compute the tangent from that point to determine the angle?
Uhm. Uhhhhhhhm. I ... uhm. I can't compute a bezier point out of x/y coordinates. Hm. I could calculate new points between the two closest points. To be honest ... I never thought about doing it that way. Thanks.

Originally Posted by Nimhfree View Post
Personally I think you will run into problems for a wide variety of curves because, for example, if the curve looks like a U the buttons could hit each other in the bottom of the U. And if you were trying to evaluate the Y position from an X position, for example, you would have problems with the U because of the vertical aspects, and with a C because of more than one X value. You might need to use some complicated math to break apart your curve into smaller "straight lines" to attempt to get the right locations.
Yes. That's true. But those problems are already solved. Actually I'm doing some math to place the buttons not just in fixed intervals. I didn't mentioned it below to keep the my description as simple as possible.

The button shape is transformed according to the buttons position and angle. So the buttons never hit/overlap each other. Like with the second and third bar in the screenshot below.
At least something that is working as expected.

  Reply With Quote