Raghav
Raghav

Reputation: 480

Physics Raycasting In Untiy

I've set up a Physics Raycast Event System for the Google Cardboard in Unity, which works if I use a cube or any of the pre-set 3D objects. When I import my own object from 3DS Max, however, the Raycast doesn't seem to detect the object. I've checked, my object does have a collider on it, and the layer is set at default. I'm using the GVR API, and the GVR Reticle Pointer.

The object which is being detected

The object which isn't being detected

Upvotes: 0

Views: 252

Answers (1)

Programmer
Programmer

Reputation: 125315

The problem is that the Collider is not even aligned on that imported Object. The center value of the Collider should be 0,0,0 so reset that. After that, click the "Edit Collider" button, go to the Scene View and modify the Collider until it matches the shape/size of your imported 3D model.

See the image I am talking about below for more info:

enter image description here

Upvotes: 2

Related Questions