Download

how can I skew the virtual touch pad 40 degrees?

I don’t seem to get any views in answerhub (1 in about 12 hours and I think it was me) so I’ma try here.

Can’t seem to work this out. I’m trying to ‘skew’ twist the virtual directional touch pad for mobile (android) as all my levels are isometric. Basically when I press UP it goes 40 degrees up-right and it feels too squiffy. I would like it to go the same direction but my thumb placement to be the same direction. If I could just rotate it.

Got it running on my nexus 9 and asked the girlfriend to test the game without telling her about the control and she basically couldn’t do it.

I’ve tried changing the scale to X -15 and Y 15 to check the results but this just sped things up.

I’ve had some thoughts about this overnight is there a way to change the direction of the world but keep my same camera angle? or rotating the full level 40 might work but I would really rather not do this for every level, and it doesn’t seem to be the correct method anyway.

I’m a one man band but I think my game is getting there is I could just eradicate the little issues like this.
Thanks for reading, Joe

The virtual joysticks just return LeftAnalogX/Y and RightAnalogX/Y. You can read these and apply your rotation to get new axes then do your own movement of the character instead of having it hooked up in the input axis mappings.

If you really want to just keep the input bindings you can modify the engine sources for SVirtualJoystick::Tick to rotate before generating the OnControllerAnalog events.