• Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a \$25 Amazon gift card!

### #ActualKryzon

Posted 08 May 2013 - 12:57 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

EDIT: On Hodgman's suggestion, there's code to calculate the UVs of a point on a sphere based on a normalized direction (i.e: a radius connecting the center of the sphere to the point where you want to find the UVs). It's from the wikipedia article on UV Mapping:

So I could take the vector from [center of eye] to [object being looked at], normalize it and use that as d.

### #3Kryzon

Posted 08 May 2013 - 12:56 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

EDIT: On Hodgman's suggestion, there's code to calculate the UVs of a point on a sphere based on a normalized direction (i.e: a radius connecting the center of the sphere to the point where you want to find the UVs). It's from the wikipedia article on UV Mapping:

So I could take the vector from [center of eye] to [object being looked at] and use that as d.

### #2Kryzon

Posted 08 May 2013 - 12:56 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

EDIT: On Hodgman's suggestion, there's code to calculate the UVs of a point on a sphere based on a normalized direction (i.e: a radius connecting the center of the sphere to the point where you want to find the UVs). It's from the wikipedia article on UV Mapping:

So I could take the vector from [center of eye] to [object being looked at] and use that as d.

### #1Kryzon

Posted 08 May 2013 - 12:25 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

PARTNERS