Canvas rotade 90deg,click error

I want to keep the game in landscape mode even the phone is in portrait. But if the canvas is rotated 90 degrees, the button click does not match the display position.

Hi @conner,

Usually it’s not doable to enforce a landscape orientation on HML5 apps and games. Try searching through the forums, there have been some discussions on the subject.

The most common way is to detect when the phone is on portrait and show a modal that instructs the user to rotate his phone. As soon as he does, the modal goes away.

1 Like