开发者

Getting x,y coordinates of a texture mapped on sphere (WPF, synch, no visualtreehelper.hittest)

technology: WPF, C#

pretext: I am making a game with a custom gyroscope+accelerometer device. I have a sphere that has a labyrinth map on it. The texture is mapped by a set of positions and texture coordinates generated from 3rd party. The user rotates the sphere via device trying to solve the labyrinth.

question: I need to get the map coordinates (x,y) from sphere coordinates (alfa,gama,theta) with custom mapping so i can check if the u开发者_运维知识库ser is hitting a wall. I cannot use visualtreehelper.hittest because it's asynchronous and I need the data in my game loop.

thanks.


I changed my approach. I baked my texture in a 3D software and exported it back with unwrap. Now I use this map in my code-behind.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜