Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

$100 reward - fix Camera Bug - when entering specific x and y coordinates at high zoom, the program automatically adjusts the figure slightly! :(

Community Beginner ,
Feb 21, 2018 Feb 21, 2018

Having a very serious problem with an issue with Adobe's camera x/y accuracy that is causing me great grief.

Just imagine two keyframes side by side that you are viewing on the camera layer.

1. I type the X and Y & zoom coordinates for one keyframe exactly the same into those of another keyframe.

2. Computer thinks it knows best and changes the number (or those after the decimal point) slightly, so the keyframe co-ordinates are not the same as the one next to it - what the hell! Why Adobe, why?

Here is a specific example,

I paste the coordinates from one keyframe, which are X = -2680.95, Y = 76.75 & zoom of 640%, to another keyframe. Seems straightforward doesn't it...

But...the program (while it does keep the zoom % the same) decides to slightly adjust the number values for the X & Y values I have pasted, changing them to X = -2681.50, Y = 77.5, which is very close but NOT the same! I can never ever paste in the exact number as it will always adjust it ever so slightly, differently every time. I dunno if its a number rounding bug, or a snapping bug (camera should not snap to grids, guides or anything else anyway) - but something is making the numbers adjust.

Now I originally thought the reason could be that my camera is quite zoomed in for these two keyframes, but the program should not take liberties with its number accuracy, because what seems to be a slight difference is very noticeable the more zoomed in you are, which is precisely the resolution level at which I'm presenting.

Any help would be hugely appreciated, I am going mad. More very happy to donate $100 reward for a solution, as this error has totally railroaded my whole project. Definitely not a problem I would have expected and very sad at the moment.

Dommy B.

686
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 14, 2018 Mar 14, 2018

Noone? Is there no fix? Any Adobe moderators here that can help?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2018 Mar 15, 2018

Hi.

Here is a possible fix. It's a JSFL script to set the exact coordinates for the camera.

Download:

fix_camera.zip - Google Drive

Usage:

- Select the frame of the camera you want to apply the coordinates;

- Execute the script by going to Commands > Run Command... or drag and drop it over Animate CC IDE or double-click it on the OS file explorer. You can also put the script in the default commands folder;

- Type the x and y values separated by comma. If you want only the x or only the y, type "x," or ",y". You have to include the comma. E.g.: 100,100 or 100, or ,100.

Considerations:

- It will not work if the camera is rotated. Sorry about that. I'll think in a way to take into consideration the camera rotation.

- Most of times, you'll have to click on the coordinates fields of the camera properties (when you click and it gets selected) to see the exact value that was set by the script.

- Event with code, some rounding may happen. It has to do with float precision, I guess.

Please, let me know if it works or if there's something I can do to better help you. I invite anyone to fix or improve this script in any way needed.

Code (for reference only):

function start()

{

    var defaultValue =  "0,0";

    var pos =            prompt("Type the coordinates. E.g.: 50.2,50.84 or 50.2, or ,50.84", defaultValue);

    var doc =            fl.getDocumentDOM();

    var timeline =      doc.getTimeline();

    var layers =        timeline.layers;

    var selectedLayers = timeline.getSelectedLayers();

    var element;

    var posX;

    var posY;

    var argument0;

    var argument1;

    var cameraScale;

  

    if (!doc || !selectedLayers || pos == null || pos.indexOf(",") == -1)

        return;

    else

    {  

        element = layers[selectedLayers].frames[timeline.currentFrame].elements[0];

      

        if (!element)

            return;

      

        cameraScale = (1000 / (element.scaleX * 10)) / 100;      

        pos = pos.replace(/\s/g,'');      

        argument0 = pos.slice(0, pos.indexOf(","));

        argument1 = pos.slice(pos.indexOf(",") + 1, pos.length);

        posX = Number(argument0);

        posY = Number(argument1);

      

        if (argument0 != "" && !isNaN(parseFloat(posX)))

            element.x = doc.width * 0.5 - (posX / cameraScale);

      

        if (argument1 != "" && !isNaN(parseFloat(posY)))

            element.y = doc.height * 0.5 - (posY / cameraScale);

    }

}

start();

I hope it helps.

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 16, 2018 Mar 16, 2018

JC,

I can't thank you enough for having the gumption to attempt this, but there is a problem.

While the script runs totally fine, the program still takes liberties with the numbers adjusting the figures after the decimal points and sometimes the whole numbers (usually by one figure). I copied the whole figures exactly from the boxes.

I have to say thank you so much for having a go, but we need to find out a way to override this rounding and add it to the code.

At the level I am zoomed in, a difference of .20 or .5 or 1 due to rounding results in a very visible jerk between frames.

How can we do this? I wonder. It seems to simple, but is not!

I really appreciate you having a go. Kudos.

Donny

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2018 Mar 16, 2018

Hi, Donny!

I'm really sorry for this.

Here is a video I did showing what to expect from the script. Please watch and tell me if this is what you are looking for.

Because if not, I'm afraid that I higher level of precision will be really hard to achieve even for regular symbols instances.

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 16, 2018 Mar 16, 2018

Yeah, that's what I did,

As you also found, the damn thing rounds the decimals.

It should not be hard to achieve - Adobe need to find the thing that stops the rounding.

The rounding also screws up tweens when zoomed in too.

I appreciate your efforts though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2018 Mar 16, 2018

I'm sorry it didn't work for you.

But please keep in mind that when I set the x property of the camera to -2680.95, Animate really rounds it to -2681. But when I set the same value with the script, the camera gets exactly -2680.95. The real value is the one when we click in the position field and its value gets selected. The value shown when we click outside is not the real one.

Anyway, you can request a fix for this problem here: Adobe Animate CC Feature Request/Bug Report Form

I hope it helps.

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 16, 2018 Mar 16, 2018

I'll try it again tonight

Sent from my iPhone

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2018 Mar 17, 2018

ok having a go now - ill see what it looks like rather than going off the

official figure

On Sat, Mar 17, 2018 at 3:18 PM, Dominic Brady <dominicbrady@gmail.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2018 Mar 17, 2018

No, definitely not. They might appear similar at the level of zoom you are at or maybe you got lucky with 2 frames.

Zoom in at 300% and you will see when you switch between frames that they are not the same

That is my experience, definitely applied script properly,

Sorry, but that it what is happening to me, definitely still rounding - i can tell by virtue of the frames not being in the same location when zoomed in

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2018 Mar 17, 2018

Got it.

I tested here with this level of zoom and I got a difference of 0.2. I still think it has to do with float precision.

What I recommend to you is to really request this bug fix and also you should try to only work with round numbers while there isn't another solution.

Anyway, I wish I could've helped you but at the same time I'm happy because of what we've learned with all of this.

Have a nice weekend.

Cheers,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2018 Mar 17, 2018
LATEST

mate your a champion, I am still very grateful for you having a go. Very

impressive

On Sun, Mar 18, 2018 at 11:14 AM, JoãoCésar <forums_noreply@adobe.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines