I am trying to create a 3d card game for mobile devices. Currently I am in the process of creating an interface to move playing cards through 3d space in the game using a touch screen. When I get the value of the touch input it gives me a 2d vector based on the screen and I can convert that vector to real 3d space. The problem is I had to offset the values I get from the input to match the true location in the game. This presents a problem for multiple sized screens. So far here are the numbers I am working with…
Screen (width / height): 905/431
Current Offset (width / height): 250/183
Movement Variance: 22
The movement variance is the number of units the card moves in real 3d for every one unit of touch. I need to find some sort of calculation to scale these values to any screen size but I am stumped. I will add some pictures to help make sense of this.
I would appreciate any input. Including a better way to use a touch interface all together. I would have imagined an easier to use touch interface system but I guess not. Maybe some way to actually link to 3d space built into the editor. I can get it to work fine on any one specific size but I need a way to scale it no matter what device people play on. If there is no way to scale accurately I guess I can use a table of values but lets try to avoid that…