Spotlight where the camera is facing

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • If you are only using one light source ( the spotlight ) you could call the Apply Lights action only once at start and not on redraw, this way it won't be affected by camera transformation and will appear to follow the camera. However, if you need other light sources that shouldn't follow the camera you must manually set the position and direction of the spotlight to that of the camera. Setting the position is simple enough but the direction is trickier. If you only rotate the camera about the y axis ( camera yaw ) then you can set spotlight direction to: X = sin( yaw ), Y = 0, Z = cos( yaw ). Or perhaps it was X = -sin( yaw ), I'm not sure.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!