How do I rotate my platformer game (The orientation is in the landscape.)?
I don't think you can force the rotation to change. That's something the actual device decides depending on which way it's turned. In the project's properties you can lock the rotation into portrait or landscape or, you can set it to 'any' which allows it to rotate when the device is rotated. You can use the browser plugin to see whether it's in portrait or landscape and you can lock and unlock the rotation.
System: Set Layout Angle
Develop games in your browser. Powerful, performant & highly capable.
Does that actually change it from portrait to landscape or just spin the layout with the rotation staying the way it is?
Then again, I may have misread what he's trying to do.
Thanks, Fengist kidswithcrowns for your input, what I want is to keep the landscaping mode but have to spin (As Fengist said) the screen based on the user's side.
What I want is to keep the landscaping mode but have to spin (As Fengist said) the screen based on the user's side.
Any solutions? Please help.
Have you tried using this browser API https://developer.mozilla.org/en-US/docs/Web/API/Gyroscope
It grants Javascript access to the gyroscope of the device, assuming there is one.
I am guessing you could write a little script that used those values to feed a number into the system action Set Layout Angle.
Haven't tried any of this myself, so it might not work, but I think it's worth a try.