Author Topic: x_line, x_dot pickable?  (Read 1294 times)

Offline matty47

  • Mr. Drawsprite
  • **
  • Posts: 71
    • View Profile
    • Matt and Marg's Homesite
x_line, x_dot pickable?
« on: 2012-Jun-03 »
Is there a way to make x_line or x_dot objects pickable with x_collisionray?
I want to be able to draw lines and points on a screen and then pick ( and adjust) individual items.
Thanks for any pointers.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10851
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: x_line, x_dot pickable?
« Reply #1 on: 2012-Jun-04 »
No. You can use X_SCREEN2WORLD twice with different Z-values to get a ray under your mouse pointer. Then use simple vector maths to find a perpendicular to another line or a point in space on this line. Take the closest one then.