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 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:
Related
I have a Sphere that is a child. The problem is that in the game I see it in front of the camera and I don't want to see it but still want to use.
If I uncheck and disable the Mesh Renderer component it might make the Sphere not working as what it needed for ?
No. The mesh renderer only draws the object in the scene, if it's disabled it will stop drawing it. Everything else will still work: if it has a collider it can collide or be clicked on, if it has a rigid body it will have certain physical properties, it will be found if you call Object.FindObjectOfType(), and so on.
Now it's a different story if you disable its game object.
Friends, I need a support.. I tried using VUFORIA GROUND PLANE DETECTION with Unity 2018.1
I found that when I add rigid body to the objects that I need to place on the plane, the objects just fall through the ground plane.. (I have added the collider to the ground plane as well)..
I also was able to recognise that the colliders get disabled until the object is placed on the plane itself.. So tried using ISKINEMATIC until the object is recognised on the plane and tried to disable the ISKINEMATIC once the object is recognised on the plane.. But this did not work even..
Can anyone support me with the solution to this problem??
I met same problem in Unity v2018.2.0f2.
My solution is freeze constraints position Y to avoid physic object fall down.
After user click on plane detection to put the object, I unfreeze it.
You can check my github
Regards,
LCD
I am using player prefab from SteamVR Plugin. Whenever player touches an object with a Collider on it, camera sees through it. I am using 0.01 as minimum clipping value. I have also added Rigidbody and Collider on camera.
I also do not have code currently but here’s a concept of how to approach the problem:
Keep a trigger collider on the camera.
Write a script that detects when that collider is within another collider (your walls). There is a method for checking if colliders are intersecting/overlapping
If there is an intersect/overlap, fade the camera to black. If there is not, fade back.
I'm learning how to use mecanim and followed a tutorial using the Raw Mocap animation set from the unity store. But the default rig would walk through cubes and fall through the plane. I've added colliders to the cube and plane but it still wouldn't work. Any guidance will be appreciated.
your character should have colliders too and if it has a rigidbody component attached to it set IsTrigger=false and it it has player controller attached to it it will only collide if the other object has player controller too
I am using Unity3D with extension of Vuforia. I am working on Cylindrical targets. When ARCamera detects the image and starts the augmentation, I want to show my GameObject (.fbx file, imported into the Meshes folder and created a Prefab out of it) on the screen.
I am working in Unity C#.
I attached a script to the GameObject and initialized it DefaultTrackableEventHandler Script. When I run it in Unity and the camera starts, I don't see my object in the Game View. Whereas in Screen View, I see that bottle (Prefab) rotating.
make sure the camera, or the focal point has your object in sight, when i tried vuforia, rotate your card slowly 360° to see if you can see the object, also your object could be far above what you expect, I would recommend very long expanded cubes in the 3 axis, to get the reference in the augmented world, then move from there