problem i have with "toWorld" expression

Scripting for After Effects

problem i have with "toWorld" expression

Postby hunter111 on 06/2/2017, 6:23 am

so. I was parenting my camera to a null object.
and then i applied the following expression to the camer'as position.
C=thisComp.layer(“Camera Controll”)
C.toWorld([0,0,0])

but two weird thing happened when I used this:

1.

Image

Image

As you can see the position of the camera has changed.
important note:those screen shots are "top view"

Another thing weird thing is the movement of the camera.
https://www.youtube.com/watch?v=EhxTo6d ... e=youtu.be
i find this confusing becuse i tought this expression should just tell the camera to take the position's data back in reltation to the world and not from the Null.
im trying to understand how this expression suppose to work and i would very appreciate if someone will be able to explain why this things happens?
hunter111
 
Posts: 90
Joined: 06/2/2011, 3:24 pm

Re: problem i have with "toWorld" expression

Postby Michael_Szalapski on 06/5/2017, 2:54 pm

Wait, you parented the camera to the null and then applied an expression to it that tried to make it follow the same null again? That's going to produce...interesting results.
______________
Michael Szalapski
Fast. Cheap. Good.
Pick two.
Michael_Szalapski
 
Posts: 8245
Joined: 02/2/2010, 1:06 pm
Location: Nashville, TN, USA
Twitter: thegreatszalam

Re: problem i have with "toWorld" expression

Postby hunter111 on 06/6/2017, 11:52 am

Michael_Szalapski wrote:Wait, you parented the camera to the null and then applied an expression to it that tried to make it follow the same null again? That's going to produce...interesting results.


LOl. To my defense at the time I tought this expression. only translating the values back to world after its being parented.
not actually tells, the layer to follow it, to be fair (it was a source for a lot of confusion).

still found a solution to my problem tough :D
hunter111
 
Posts: 90
Joined: 06/2/2011, 3:24 pm


Return to After Effects Expressions