How to set up the priority, when mouse contorl camera and object?

I build the logic mouse wheel up/down contorl camera zoom in/out,
and, there are some object, I build the logic for each object,
I hope mouse over one of objects, mouse wheel up/down contorl that object move .
but now, camera zoom and object move at the same time.
I don’t know how to set up the priority, let camera at a standstill when object move?

When you apply the same controls to different operations it is pretty normal that all operations are performed when you trigger the controls.

From what I understand from your description is you want either camera zoom or object move but not both.

How do you want to tell your application when you mean the camera and when you mean the object?

i found a way, but not perfect, as the picture shows.
I add nor controller on object, let it control camera, it works well.
But question is, If there are 100 objects, I have to add the same logic 100 times?



If add a game property for camera ,
how to assign a value to it when mouse (not) over any object?

Typically you lock/unlock the camera.

You can do this with messages.

example:
Mouse over movable object -> message “lock camera”
Mouse not over movable object -> message “unlock camera”

According to your description, you want to move the object under the mouse cursor. Due to it’s dynamic nature I suggest you use a single object that applies the motion to the detected object. This way you need this logic just once.

Thank you very much, Mnoster.
I’m new, I don’t know how to do it. Can you tell me more detail?
Thanks.