Clickable and Rotatable models using Unity and ARToolkit - unity3d

Can the 3D models used with the markers be made clickable and rotate able using Unity3D engine and ARToolkit unity. Basically in the AR desktop application we are making , we want to implement this functionality on the 3D models as well. Kindly need help in this matter. ThankYou.

The only issue you could find is that the Transformation of the AR Tracked Object changes based on the visual information.
If you simply use that as a base object and put any other models as children of that one, you can modify their position and rotation in the same way you would do for any other situation.
So, as you see, the Marker scene has nothing but an AR Tracked Object, this is the object that will be updated with the pose of the marker.
Then, the Cube is a child of this object. If you modify the localPosition or localRotation of the cube it will work as you want it.
The Cube is a child of the Marker scene, its global position and rotation will be a combination of the position and rotation of its parent with its local position and rotation (this is standard 3DEngine / SceneGraph behaviour).

Related

Unity3D: Position objects relative to Vuforia Image marker im multiple scenes

I have two scenes:
Scene1: User has to track Image marker.
Scene2: Display Objects relative to the image marker scanned in Scene1.
In Scene1 i attached "Vuforia Behaviour Script" to the MRKT camera. In Scene2 im just using the out of the box camera from MRTK (wihtout Vuforia Behaviour Script).
Is there any way to store the position data to archive this?
Im using Hololens2 With MRTK
You can use Spatial Anchor to track the special point in the world. When you are using this technology, you should note the locations where you create anchors should have stable visual features(that is, features that don't change often). For example, the physical surface you mentioned Vuforia image marker is not a good point to create anchors. However, it would be good practice to place anchors where they have stable visual features around Vuforia image markers and record the relative position of the image marker from the anchor.
If you are new to the Spatial Anchor, you can start from here: Spatial Anchor

HoloLens companion map

I am implementing a "companion map" for a HoloLens application using Unity and Visual Studio. My vision is for a small rectangular map to be affixed to the bottom right of the HoloLens view, and to follow the HoloLens user as they move about, much like the display of a video game.
At the moment my "map" is a .jpeg made into a material and put on an upright plane. Is there a way for me to affix the plane such that it is always in the bottom right of the user's view, as opposed to being fixed in the 3D space that the user moves through?
The Orbital Solver in MRTK can implement this idea without even writing any code. It can lock the map to a specified position and offset it from the player.
To use it what you need to do is:
Add Orbital Script Component to your companion map.
Modify the Local Offset and World Offset properties to keep the map in the bottom right of the user's view.
Modify the Orientation Type as Face Tracked Object.
Besides, the SolverExamples scene provided by the mrtkv2 SDK is an excellent outset to become familiar with Solver components

ARCore custom object not touching the tracked plane with bottom

I am experimenting with the ARCore SDK inside Unity to make an Augmented Reality app. As a start I ran the HelloAR Demo app where the ground is detected and onto which you can place multiple Andy's when tapping on the screen. I notice the Andy's are placed on top of the plane, as it should.
Now, I create a 3D Cube object and replaced the Andy prefab with the Cube. This places Cubes instead of Andy's in the app. However, I notice that the bottom of the cube is not touching the plane! The plane runs through the center of the cube, which is not an ideal scenario!
I looked on the internet for a solution, but haven't found it yet. On another website there was someone with the same issue, but no solution was provided. Only a reponse stating that it works only with the ARCore demo objects, not with custom objects.
Can someone help me out on this one?
Thanks!
I have found the solution to my problem.
The pivot point of my Cube GameObject was in the center. All I did was wrap an empty GameObject around the Cube and repositioned the pivot point to the bottom of the Cube. From this I created a Prefab and used it inside the app. Now the cubes are placed correctly on top of the plane.
One thing I do is any objects that don't have centers where they should be, is to load the .obj into blender, and move it to the center of world axes. I might also tell it "center to geometry" before centering on world axis, then I export as .obj (selection only).

crosshair pointer enter on vuforia unity project

I have successfully enabled 3d object detection through vuforia in Unity. I have attached a crosshair (reticle) at the centre of the screen in screenspace overlay. when the user moves his phone over the 3d object which is produced upon object detection, I want a label to appear when crosshair crosses different parts of the 3d object. I tried many methods including, collision, cursor and reticle. It is not working.
Is there any easy way to implement this so that I can use event trigger pointer enter to make few things happening on the game.
I successfully solved my problem. The solution is using worldspace crosshair.
Most of the crosshairs available in the assets are cemeraspace. therefore using a worldspace corsshair solved my problem. It may be useful to someone in future.

Can not see game objects after change their layer in reference prefab in Unity

I'm creating a 2d game using Unity and get the following problem. When I change the layer of some game object in its reference prefab, I can not see that game object in the scene window.
In Unity, cameras can view one or more layers simultaneously. If you have created a new layer, be sure that at least one of your cameras is set to render it. You may have placed your object on a layer which is not currently being rendered on any of your scene's cameras.
Maybe you have set some layers as invisible. You can check visible layers in a popup list "Layers" at top right corner of Unity Editor window.