Drag Rigidbody script on TWO cameras?

Hey !

I have a newbie question that I really need some help with.

I wan´t two cameras to use the drag rigidbody script and both be abel to drag objects…

How do I do this?

Any ideas?

The Drag Rigidbody script uses its FindCamera function to check if there is a camera component on the current object. If you need to switch between cameras for different views then you can just attach the Drag Rigidbody script to each camera. Since all cameras except the one currently displaying are disabled (or at least they should be) then only the active camera will get updates on the script. If you need to show the output of more than one camera onscreen at once (say for a minimap) then you will need to modify the FindCamera function to detect which camera is the relevant one for the dragging. This may involve detecting which camera’s view rectangle the mouse is in or keeping track of the camera that currently has dragging enabled.