Game Development Community

Trouble with my link points being way off

by Ben R Vesco · in Torque Game Builder · 07/09/2006 (12:27 pm) · 2 replies

I'm having some trouble with link points being way off where they should be.

Link Points: 3.5 -2 -3.5 -6 -3.5 6 3.5 2
Position: -43.000000 -8.500000
Link 1: -16.75 -28.5 difference:  26.25 -20
Link 2: -69.25 -68.5 difference: -26.25 -60
Link 3: -69.25  51.5 difference: -26.25  60
Link 4: -16.75  11.5 difference:  26.25  20

Notice my link points are way off where they should be. They should be at the position plus the offset of the link point. I am using link points on some of my other objects and they're working fine. Has anyone seen this behavior before?

#1
07/09/2006 (1:24 pm)
Ah, I've found the solution. Apparently link points are not hard coordinate offsets, but percentages of the object's size. So I was essentially saying to make the first link point +350% size in the x direction and +200% size in the y direction. I didn't realize object space was normalized and that was my error.
#2
07/09/2006 (4:22 pm)
Yep, you got it. You can use %object.getLoacalPoint(%position) to get the local offset for a given world position.