Picking without Physics ( .Raycast )

Hi folks,

I’m currently evaluating Unity 3D for an iPhone project, and have a question…

Currently, there are two ways to pick an object…

  1. Use Physics.Raycast.

However, if you don’t use dynamic objects in your scene, it would be great to raycast without having the overhead of the PhysX library.

  1. Add OnMouseDown to each model that could be picked.

This could be a bit of a PITA to add ( esp if the source 3D scene is changing all the time ).

It would be great if there was a generic raycast in 3D space ( and even a raycast from the screen, taking into account camera parameters ) which didn’t require PhysX.

Three quick q’s then - for now :slight_smile:

  1. Is this possible / planned?

  2. Roughly how big is the PhysX overhead?

  3. Does the onMouseDown functionality require PhysX also?

Well, maybe throw in a 4th, if 1) is a no.

  1. Would this be a useful feature for other developers out there?

Mal[/b]

Those are actually the exact same way; OnMouseDown is simply hiding the raycasting code from you.

–Eric