- Home /
OnMouseEnter -/Exit with multiple Cameras
Hey
I got trouble with the Monobehaviour.OnMouseEnter(){} event. I'm using 5 cameras to generate a stereoscopic Image inside a shader which outputs the calculated Image to the original main Camera. But the Methods OnMouseEnter, OnMouseExit and OnMouseOver dont trigger any events. If there is only one Camera in the scene everthing works perfektly, but multiple cameras won't. Is there any connection between cameras and these events? Can I specify a camera which is responsible for that? Or am I just missing something :/?
void OnMouseEnter() {
if(!MouseStateHandler.IsCameraControlled) {
this.gameObject.renderer.material = _highlightMaterial;
}
Debug.Log("OnMouseEnter");
}
This works for 1 camera...
Thanks.
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
OnRenderImage in one of the two cameras, Android showing only post processed camera. 1 Answer
How do I use mathf.clamp to make boundaries for a camera 0 Answers
How I get sizeof pixels of object 1 Answer
why when my first person camera looks at to many gameobjects it becomes really sensitive? 1 Answer