Jump to content
  • Advertisement
Sign in to follow this  
SwimDoc

Moving two points to keep a line between them

This topic is 3122 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there everyone. So I am a little disappointed in myself in having this problem but I have banged my head against it and dont see a real good way to solve it. I have created a control in C# that is just a graphical representation of a curve that can be manipulated. This includes viewing influence points for bezier curves. The user can then move those points to change the curve. My problem comes in that I want the user to be able to move on point and have its coresponding point move the same. Currently I am moving one point by a distance and moving the other point by the same distance. That works fine when the points are the same distance from their point on the curve. However, if one is longer they start becoming slightly off and I need them to keep looking like a straight line until the user breaks them. I have also tried setting up a ratio by using the distance traveled over its original distance but I am getting floating errors that shoot to infinity. Also, because these points can move in both directions SOH CAH TOA is out because I do not have a guarenteed right angle. Any thoughts on this would be great. Thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!