Highlighted

## Controlling light direction of CCSphere

Community Beginner ,
Jul 31, 2020

Copied

Hi,

I've created two CC Spheres "A" for Moon and "B" for Sun. I want to keep "Light Direction" value of moon as per the position of Sun. Whereever the Sun is, the "Light Direction" Value should automatically adjusted and Light Direction should be towards the Sun. How can I do that, Please guide me.

Regards,

Shakeel

Most Valuable Participant
| Most Valuable Participant

Look up good old "targeting expressions" using Math.atan() based on the posuitional differences of the two spheres. here's an example that took five seconds to find on Google:

https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=32743&univpostid=32743&pview=t

Mylenium

Topics

Expressions, How to

Views

55

Likes

Report

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

## Controlling light direction of CCSphere

Community Beginner ,
Jul 31, 2020

Copied

Hi,

I've created two CC Spheres "A" for Moon and "B" for Sun. I want to keep "Light Direction" value of moon as per the position of Sun. Whereever the Sun is, the "Light Direction" Value should automatically adjusted and Light Direction should be towards the Sun. How can I do that, Please guide me.

Regards,

Shakeel

Most Valuable Participant
| Most Valuable Participant

Look up good old "targeting expressions" using Math.atan() based on the posuitional differences of the two spheres. here's an example that took five seconds to find on Google:

https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=32743&univpostid=32743&pview=t

Mylenium

Topics

Expressions, How to

Views

56

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 31, 2020 0
5 Replies 5
Most Valuable Participant ,
Jul 31, 2020

Copied

Look up good old "targeting expressions" using Math.atan() based on the posuitional differences of the two spheres. here's an example that took five seconds to find on Google:

https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=32743&univpostid=32743&pview=...

Mylenium

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 31, 2020 2
Community Beginner ,
Aug 08, 2020

Copied

Thanks for your reply but I was looking for a solution that is easy for newbies like me.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 08, 2020 0
Aug 08, 2020

Copied

What Mylenium has suggested is going to be as easy as it gets. You already have a grasp of what you want to do. All you need to do is to paste the provided Expression into the correct property.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 08, 2020 1
Aug 08, 2020

Copied

Not trying to be snarky here, but manually keyframing is often the "easy" option.
Making things dynamic/responsive in AE takes a little work and a little code.
The other "easy" option is paying someone else to do the work for you.

If you're interested in this kind of functionality, I'd recommend learning a bit about expressions. With even an introductory understanding of them, you can start coming up with all kinds of ways to apply them in your daily work.

Good luck!

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 08, 2020 1
LATEST
Community Beginner ,
Aug 08, 2020