Camera Switch Binding

Posts: 100
Hey - I'm trying to do something pretty complex and I'm not sure as to how I could accomplish it.

Basically - I'm trying to put on a decent representation of rain on the camera lens, using overlays in OBS. Is there a way to send a keystroke externally when the camera switches from one angle to another? I know that cameras are tied to the distance from the S/F line, so maybe there's a way to know when the car the camera is focused on crosses that threshold and changes the camera angle?

I want to send a keystroke externally to OBS. Probably not possible, but worth a try.
Posts: 49
You can bind cameras to buttons. You must know the full camera name case sensitive. So OnBoard in sim would be OnBoard in the button camera
Posts: 785
I think Kyle wants to react to an automatic camera change, right?

I don't think this is possible. We do track the current camera and you could potentially use a script to listen for camera changes (sim.CameraManager.CameraChanged event), however I am pretty sure this only happens when you switch to a completely different camera group (e.g. chase cam to chopper cam), not when a static cam switches to a different viewpoint based on distance along the track.

But maybe I'm wrong. You can check yourself by opening the Data Explorer and finding the property CurrentGroupId in the CameraManager. Check that value while you watch a car going around the track and see when it changes.

Using the track distance of the currently followed driver may be possible. You can get the followed driver from the CameraManager.FollowedEntity and then get his percentage around the track from FollowedEntity.Movement.TrackPct.

However I do not think the camera switch happens based on the distance along the track. I think it depends also on distance from the camera, whether the car is even in view, and from my experience it also isn't always repeatable even if you simply rewind the tape a few times and play it back, I remember it seemed to switch at different moments. I never really dug into it but I doubt you can get this to work well.


If you do find a way to track it properly, you could potentially use SendKeys in a script to send a keypress to Windows in general. This is dangerous though, the keypress will go to whatever has focus so you may end up doing something you didn't want to do.


It sounds like it would probably be much easier to build a separate tool for this instead of trying to make it work in ATVO, it clearly isn't designed for this :)
Posts: 100
Thanks Nick - just was a curiosity I had. I was playing around more with the overlays I was making to simulate rain and settled on something that doesn't look to bad when the camera switches. The idea I had is just way too complicated and too much time for too little benefit. Learned something in your post there, so I appreciate your time. I'm currently enrolled in university and in a couple programming classes, so each day I'm learning how to do more and more in the script editor. It's very powerful.

Thanks!