Unity ARFoundation - Augmented Objects does not register collisions - unity3d

I'm currently stuck with my remote control app in terms of collisions.
I'm using Arcore XR plugin and AR Foundation.
I've placed a building and added mesh collider on it and my car.
My car has a rigidbody component so when I play it in the editor the car stops when hitting the building as intended.
However, when building the app to my android device it just drives through it as if there were no colliders/as if my phone has no collisipn dtection.
I've tried adding rigidbody on my building and ticking on and off convex.
Right now I'm out of ideas.
What am I missing?

Resolved:
If you're experiencing the same problems, if you've imported any FBX file, make sure to have Read/Write enabled.
Go to your Project Folder in Unity, find your .fbx models and click on it.
Then in the inspector, click Model then make sure that Read/Write is enabled.
Mesh Colliders should now work.

Related

Using Gaze-based pointer with 3D objects

I recently downloaded Unity 5.6.0f3 and imported Google VR SDK 1.4.0 to be used in my project. I attached the GvrPointerInputModule to my EventSystem, placed GvrViewerMain / GvrReticlePointer as children of my MainCamera, placed the GvrPointerPhysicsRaycaster script as a component of my MainCamera, and my 3D objects all have colliders. Is there anything I am missing from this equation to get gaze-based interaction working with my Event Triggers?

Unity gear VR reticle pointer shows double when focusing on close objects

I'm developing a VR app in Unity for the Samsung Gear VR and I'm trying to implement a pointer so the user can interact with the objects in the scene. When you look at distant objects it looks fine, but when you focus on close objects (which is highly needed for the app mechanics) the pointer appears to be duplicated, so you need to center the desired object in the middle of the points :P
What I've tried
-Using the GvrReticlePointer that comes with the GoogleVR package for cardboard
-Creating my own pointer by adding a canvas to the main camera with an image in the center
-Changing some of the Camera settings like field of view, stereo separation, etc.
-Configure my phone via a QR code http://imgur.com/fVrNrQk
Steps to reproduce (With canvas added to camera)
1.- Create a simple scene with a few objects to look at in Unity
2.- Set build settings for android
3.- Configure player settings to enable "Virtiual Reality Supported"
4.- Add Oculus as Virtual Reality SDK
5.- Set package name and minimum API level
6.- Add a canvas to the camera
7.- Add an image to the canvas, a cross will do the job
Observations
I'm using Unity 5.6.0b10 since google cardboard's site recommends using this version for the GoogleVR package. And I'm using the Samsung Gear VR with a Samsung Galaxy S6 edge + phone.
Solved
Apparently this is a well documented issue called voluntary Diplopia, and it's a human bug not a software one (read here, Unity's documentation, section The Reticle Interaction in VR).
The problem is trying to put the reticle at a fixed point in the user interface, like traditional 3D games. When looking at closer objects in VR this is going to cause this seeing double problem.
The solution is to position the reticle at the point in the 3D space the user is looking at. If he's looking closer, the reticle is drawn closer. Of course now you also have to scale the reticle accordingly, so the users can see it the same size no matter where they're looking at.
Unity also provides some example scripts about this, you can find them in the assets store, is called VR Samples.
Now I have performance issues (I'm working on mobile platforms): sometimes, when you turn your head fast you can see the reticle where it was drawn before. But looks way better than the double reticle version.

3d FBX file import into Unity not working as expected

I am interested in building virtual reality applications and I am at beginner level.
I imported a FBX file of Airplane and imported it in Unity,
Upon linking the animation in Unity and building it onto my Mobile, I see a 2D version of the model. How should I convert it into virtual reality application.
Below is a snalshot of the file. The aiation is also fairly simple, one plane takes off and flies for sometime before landing.
Below is a snapshot of the Game Console
So inshort the question is how do I convert this into a 3D mode so that I can use it as a virtual reality Application.
Thank you
That is 3D mode.
Making a VR application isn't done at the push of a button
Start here:
Read about VR in unity
It seems like you are a new Unity user. If so do this first:
Depending on what you want to do in your application you should look into the Unity Documentation and read about:
Basics
Cameras
Creating Gameplay
Animation
If you at some point feel you don't understand these links, you may need to take another step back and start off by checking out the official tutorials
Just save your .blend file in the Unity's Assets folder.
Look at the documentation for more informations

Vuforia not showing what the webcam sees in Unity while still capturing the marker

I am making a first-person game using Unity and Vuforia. What I'm trying to achieve is that the user can have a marker attached on an object that can be held in his hand (a bottle, a book, or toy). So when he plays the game, he can hold the object in his hand, have the object facing the webcam, and move or rotate the object to control the first person character in Unity, e.g., tilt the marker-attached bottle in physical world so the first person character moves forward in Unity's virtual world. ps. by virtual world I mean just a basic first-person character walking around in a room, not the kind of VR that involves Oculus Rift.
I just played around with Vuforia. The good thing is I can choose my own image as the marker (looks like not every marker-based Unity plug-in can do this). But with Vuforia, can I create a virtual environment that's not showing the webcam's view? I did a basic Vuforia + Unity tutorial that only shows what the webcam captures and overlays a virtual cube on the detected marker. Summary of what I need is: not showing the webcam's view but still have the webcam functioning that it can capture the marker and I can use its position/rotation. In a way you can say I am just using the marker+webcam combo as a sensor used to control my virtual world activity.
Thanks!
From what I get it appears you want to use your marker as a target object to control motion in AR..
You'll have to build the functionality in Unity only as to what you want it to do specifically according to your set gameplay..
For example if you want a virtual dog to follow a target object, one easy way to do it is to provide an offset between the marker and the game Object and play a walking/running animation.
So it will appear as if the object is always following the marker, whereas in reality it is playing same animation at a constant distance.
As far as importing the marker is concerned.. It is no different than what you must have done with your cube..
In your Vuforia account Dev Portal:
Download the Vuforia SDK and import in your Unity asset folder.
Go to Liscense Manager under Develop tab and add a Liscense Key.
Now go to the Target Manager and add your images in the Databse which you want as target. (make sure the image quality is good for it to work prperly)
Now download the database and import it in your Assets folder in Unity.
Now go to your Liscense Manager again and copy your Liscense key and Open Vuforia Configuration under Vuforia Behaviour (Script) when you click on AR Camera, you'll find a dialog box there, paste this key there.
Save the build and run your game in Unity and bring the marker in front of the Webcam and it should work properly.
Hope this helps.

Unity 3D importing

I used to code in c# using Xna then I saw Unity 3D engine and I downloaded latest version installed correctly started development of my game but suddenly when I was importing my animated character Unity 3d blocked my pc ! I noticed that my keyboard goes off when that happened and I cant move arrow or call task menager I can only restart pc ! So brother and sisters help me on my way .
Model files that are placed in the Assets folder in your Unity project are automatically imported and stored as Unity assets.
A model file may contain a 3D model, such as a character, a building, or a piece of furniture. The model is imported as multiple assets. In the Project view the main imported object is a Model Prefab. Usually there are also up to several Mesh objects that are referenced by the Model Prefab.
A model file may also contain animation data which can be used to animate this model or other models. The animation data is imported as one or more Animation Clips.
What I understand in your question is that whenever you try to import assets into unity it makes trouble.
Try to place them in the folder in your drive and then run the project in Unity.
The normal path of Unity project is C:\Users\Public\Documents\Unity Projects
From what I understand; Your computer is spazzing out when you're trying to import Animated 3D characters into Unity 3D
I have faced a similar problem.
The solution I believe might work is :
Create the appropriate folders inside of unity. Assets > Models
Outside of unity, place the OBJ file for the models into your c:\Users\Public\Documents\Unity Projects\Your Project or wherever it might be, in the Assets\Models folder.
Then when you're inside unity, it should be in there without any issues.
That should do the trick.