I would like to make this spotlight mesh follow (look at) a target when I move the target. The spotlight is made of 3 parts: base, arms and head. The base does not move, the arms move vertically and the head moves horizontally. The thing is that I would like the head to follow the target when it moves but also that it is constrained to a set axis (vertical axis) while the arms rotate too following the rotation of the head.
To summarize, I would like to be able to move the spotlight mesh follow a target while every part of the spotlight (arms, head) rotate too still being constrained to their own axes so that I can animate the target and the spotlight will follow properly this target.
I guess it involves a little bit of maths here but I can’t quite figure how to achieve this result. I know that there already exists a look at function but I don’t know how to constrain the head and the arms to a single axis. It’s almost like if I should use some IK setup to achieve this result.