Unity3D - Is there a XRSocketInteractor alternative in SteamVR plugin? - c#

Is there a snapping mechanism in unity SteamVR plugin?
I've been wanted to grab a object from a desk, for example, and hoping a snap zone would show up and let my object attach into,
plus, i would need a detection mechanism to detect the object in place, but i'm quite stuck on the first step
Using Itempackage won't let me leave item prefab blank
There's no detection mechanism for itempackages
Should i use a OnTriggerEnter() or related to detect a object that goes into it?
Any help would be appreciated.

Related

How do I use trigger to destroy blocks on quest 2 unity?

I am making a game in Unity that is a combination of gorilla tag and minecraft and I am having trouble with using the RawAxsis1D.RIndexTrigger (top right quest 2 controller trigger) to destroy objects. (Some of my objects I'm trying to destroy have children.) I am also using raycasing so that it will make it so it will destroy the object the player is looking at, so far everything I have tried has failed.
Can anyone help me out? I am happy to provide any further info.
Main problem: when I add my script to my player, it did not do anything when the trigger was hit.

How to make a hexagonal shaped "plane" in Unity

So i have already asked about this on the unity forums but i thought i'd ask here too.
Basically i want to create a hexagonal shaped plane object to create terrains, however the "plane" gameobject is square, could anyone point me in the right direction of how to do this?
Thanks in advance
find any hexa plane.obj or even .fbx online , or create it by any builder asset or using unity pro builder.
here is a hexagon.obj
https://drive.google.com/file/d/1K32bE6Kb22u3rt2hl3zoAuqUOvCZlT-r/view?usp=sharing
You can use Unity's Pro Builder Asset to create custom meshes for your game.
Here is some information about it: https://unity3d.com/unity/features/worldbuilding/probuilder
You have a few options....
First of all, does it have to be hexagonal, or just look hexagonal?
You could potentially use a texture with alpha transparency to make it appear hexagonal (although it would still be a full plane for all practical purposes, eg colliders).
Short of that, you need to create a custom mesh (model).
Again, there are lots of ways you can approach this. It's possible to do from inside Unity using code. This is very flexible, but pretty advanced.
Much simpler for now would be to use an external modelling tool (Blender is free and highly thought of).
Whatever you pick, it will almost certainly have a Polygon circle command that will allow you to specify how many points it should use.
Simply enter 6 here and you'll get a perfect hexagon.
Save as .fbx somewhere in your unity project. Unity will import the model and you can then drag it into your scene.

How can I create an Android object recognition application where I can display information when they are clicked using Vuforia and Unity?

Right now I am trying to create an android object recognition application (it will be through an image) with Vuforia and Unity.
What I will show will be a 3D map, but in addition to showing it I want to present information of certain parts of the model (buildings, etc.) either by pressing it or pointing it at a similar point than in virtual reality..
What I want to create is something like this:
https://www.youtube.com/watch?v=y70yStPCBHA
I am very novice and as much as I try to understand how to do it, I do not succeed. Try searching for information on different websites, but I couldn't find anything similar to the video.
I hope you can help me, I would appreciate it.
I am sorry for my bad english.
your problem is not as complex as you might think. You should try searching for stuff not as a complete structure of every functionality that you need but you should break it down to smaller components.
In the instance you could just serch for how to detect touch on a game object in unity and you can find a lot of stuff about that. It's a good thing to get used to because you can find separate guides for all the components you need and then just combine everything together.
Check this video out about raycasting from touch to game object, it should be everything you need: https://www.youtube.com/watch?v=0sFrDJKwsdM
hope this helps!

What is the best way to manage Player object of SteamVR plugin for Unity3D when change of scene

I am developping an application using the new version of SteamVR plugin (2.2) for unity and i need to navigate between several scene during the game.
I have for all my scenes a Player object coming from the SteamVR plugin handle input and event, who is a singelton dontDestroyOnLoad, and i don't know the best way to handle this object during the change of scene.
There is 3 options in my opinion :
For all scene a player object is present, but steamVR don't check if an instance already exist so i add this feature to have only one player after scene initialisation.
The other solution is to destroy the current instance before loading the new scene but with the new system of event made by Valve in this version i don't know if it's a good way to manage the fact to have only one player at the time, can potentiolly create event conflict (didn't saw yet).
The last one but not really confident with it is to let 2 player per scene and one of this is the good instance of the singelton class (way more anoying to get the good instance Player, and can i have conflict between them ?)
If someone have some idea or can give me better understood of my conception issue you are welcome :)

anyone tried Leap Motion with Unity? we can't grab objects in the Demo Pack

We've setup the leap motion, got it to successfully run in Standard Unity by moving the DLLs around per instructions, and can successfully track hand positions when running the scenes in this demo. But we cannot grab objects in any scene. We have only gotten the Boxing and Flying scenes to work, because those in fact requires no gestures, simply pushing outwards knocks the bag around, or just detects relative positions of hands to cause flight. But the actual grab action we cannot get to execute, in Unity only. The Airspace apps (orientation + freeform) work fine, and the Visualizer works fine.
See this video short video of us trying http://youtu.be/9kTXCEwUhoc The documentation for the Boxing, ATVDriving, and Weapons all just say to grab when colliding, but we've tried many times and cannot get it to execute even once. The rings should turn red like exactly here https://www.youtube.com/watch?v=RA7a6foNlHo&t=1m8s but they never do, always staying blue no matter what we do.
Any idea what's wrong?
Demo Pack Documentation: https://developer.leapmotion.com/documentation/skeletal/csharp/devguide/Unity_Demo_Pack.html
GitHub project: https://github.com/GameMakersUnion/LeapTest (already has DLLs setup for Standard -free- Unity)
This question was answered on the Leap Motion forum; thought I'd copy it here:
Are you trying to grab objects in general or are you trying to get the demo pack to work?
I don't really know why the demo pack doesn't work as I don't know very much about it, but if you're trying to make an app to grab objects you might check out our v2 tracking and skeletal assets.
developer.leapmotion.com //
https://www.assetstore.unity3d.com/en/#!/content/177703
There's a few demos in our gallery that show grabbing, specifically the RagdollThrower example.
Also, next week we'll be updating the skeletal unity assets with more powerful grabbing.
Not sure if this is what you're looking for, but I thought it might be of interest.
(Source: https://community.leapmotion.com/t/anyone-here-tried-the-unity-demo-pack-we-cant-grab-objects-in-it/1415)
What you need is to look for the Physics model for Hand Pinching something like that. but the word pinch is the trick.
You can add the pinching to your hand contoller or sandbox, then the object should have Rigidbody to be grabable.
Please contact if you want to share info about leap and C#

Categories

Resources