Skip to main content
Participant
December 11, 2020
Question

Camera working differently across devices

  • December 11, 2020
  • 1 reply
  • 208 views

Help! 

I'm making an interactive map where you click on a pin-shaped button to camera zoom in on that location and some stats appear. It was looking good in test view, as well as integrated into my website on desktop, but on mobile the camera is zooming to different locations.

I'm doing all the zooming/animation through action script- my animation is only one frame.

 

I have this issue when I tell the camera to zoom to

event.stageX / dpr,

event.stageY / dpr

 

or to

(env.cam.InitX + 100) / dpr

(env.cam.InitY -80) / dpr 

where var env = {

cam.InitX: CameraObject.camera.x,

cam.InitY: CameraObject.camera.y }

What is happening???

 

 

 

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    December 11, 2020

    use a text field to display those values so you can see how your mobile and desktop differ.

    Participant
    December 11, 2020

    @kglad  Sorry, I'm really new to this. Can you elaborate on what you mean? 

    kglad
    Community Expert
    Community Expert
    December 11, 2020

    when debugging on mobile you can't use trace/console.log.  use a text field (during testing) to display relevant value.