Game Development Community

Texture(skin) questions

by Ronald J Nelson · in Torque Game Engine · 12/16/2007 (3:46 pm) · 3 replies

I need to know a the answer to a couple of questions I am hoping someone can tell me the answer to.

1. Is there a way to detect from a raycast the 2D texture coordinates on a shape at a point?

For example, if a collision happened at a certain point on the player, the player's skin texture is a 512 X 512 pixel image, how can I tell that the texture coordinate is at something like X=123 and Y=298? Keep in mind those are just example coordinates.

2. Is there some way to force what the size of a skin must be? For axample all player skins must be 512 x 512 pixels.

Thanks in advance.

#1
12/16/2007 (6:21 pm)
Also if I have to do this myself, I wanted to find out if there was some function already in place that gives you the size of the textures?
#2
12/17/2007 (8:17 am)
I have been looking through gBitmap and I don't see anything that would be useful as of yet that could even do something so simple as just give me the XY size of a bitmap.

Has NOONE tried or knows of any methods to do what I am asking?
#3
12/17/2007 (1:32 pm)
I managed to make my own consolemethods to get the texture sizes. I would be interested in knowing if someone managed to get the texture coordinates in the method I asked about though.