YOU’RE THE only ONE NOT playing WITH UNITY
YOU’RE THE only ONE NOT playing WITH UNITY

YOU’RE THE only ONE NOT playing WITH UNITY

It wasn’t as well long back that a person might conjecture that a lot of hackers are not avid video game players. We spend a lot of of our complimentary time taking things apart, tinkering with microcontrollers as well as reading the current [Jenny List] post on Hackaday.com. When we do believe of video games, our neurons normally terminate in the direction of emulating a console on a single board computer, such as a Raspberry Pi or a Beaglebone. Or even emulating the actual console processor on an FPGA. seldom do we venture off into 3D programs indicated to make contemporary video games. If we can’t export an .STL with it, we’re not interested. It’s just not our bag.

Oculus Rift altered this. The VR headset was originally developed for 3D video games, however swiftly ended up being a darling to hackers the world over. online truth innovation is far bigger than just video games, as well as brings chance to lots of fields such as genuine estate, construction, product visualization, education, social interaction… the listing goes on as well as on.

The Oculus team got together with the people over at Unity in the early days to make it simple for video game makers to make material for the Rift. Unity is a game engine created with a shallow discovering curve as well as is offered for complimentary for non-commercial use. The Oculus Rift can be integrated into a Unity atmosphere with the inspect of a setting as well as importing a little package, offered on the Oculus site. This makes it simple for any individual thinking about VR innovation to get a Rift as well as begin pumping out content.

Hackers have taken things a step additionally as well as have written scripts that enable Unity to interact with an Arduino. VR is fun. however VR plus physical truth is just down ideal exciting! In this article, we’re going to walk you with setting up your Oculus Rift as well as Unity game engine to interact with the outside world by means of an Arduino.

Off the shelf Options

If you head over to the Unity possession page as well as run a browse for Arduino, you get a few options. Sadly, searches for Raspberry Pi do not produce any type of fruit. There are a few generic serial communication choices such as basic Serial as well as SD Serial, however these choices are not complimentary as well as do not, at deal with value, appear to be well supported. Unidino looks promising, however it’s thirty bucks as well as there’s not much activity on the forum. The evident option to play around with on a rainy day is ARDunity. There’s a complimentary version that still has lots of ability to experiment with, as well as it’s well supported as well as documented.  It’s written in a lot more of a WYSIWYG style that can be off-putting to coders, however it will have to suffice up until somebody bangs out a lot more advanced version.

Başlarken

We’re presuming that you already have Arduino as well as Oculus configuration on your PC. If you don’t have an Oculus Rift, we suggest to go to the Oculus site as well as set up the software application anyway. It will enable you to test the Unity/Arduino communication with the Oculus run-time even if you don’t have the hardware. This method when you do get a headset, you won’t have to do anything. just execute the .exe as well as you’ll see your work in VR. note that they utilized to stop the software application from installing on computers that did not satisfy the minimum requirements. Oculus has considering that toned down this nuisance, as well as now enables the software application to be installed on a lot of computers, including laptops!

Setting up Unity is directly ahead – just go to the site as well as download the installer. the current version at the time of this post is 5.6.1. You’ll want to get hold of the personal version – it’s about five Gigabytes, so provide it a long time to download. when installed, head over to the Oculus site as well as get hold of the Unity tools import package.

Open Unity as well as open a new project. then head back to the Unity possession store as well as set up the ARDunity fundamental Import package.  This will open Unity, as well as you must see a tab called possession Store. click on the tab as well as then import the package. then go to Edit–>Project Settings–>Player as well as set the API compatibility level to .NET 2.0. This will remove the error you see in the bottom of the screen. then under other Settings, be sure to choose the online truth supported option.

Now import the Oculus bundle by going to Asset–>Import Package–>Custom bundle as well as point towards the Oculus bundle you downloaded earlier. Restart the Unity program if needed.

Putting everything Together

At this point, whatever must be set to get Unity speaking to your Arduino with the Oculus Rift. put an LED on D2 as well as note your comm port.  From the job tab (lower left),  broaden the folders ARDunity–>Examples–>LED–>Dijital. Son örneği çift tıklatın – ReactingTrigger (DigitalLed) .unity.

Bu, örneği tonlar. Şimdi, görünüm penceresinde iki küp görmelisiniz ve ayrıca sol üstteki hiyerarşi sekmesinde Ardunity adlı yeni bir klasör. Ardunity’ye tıklayınız ve “İhracat Kroki” anlamına gelen bir düğmeyi eklemek için Müfettiş sekmesini (çok sağa) modifikasyonunu görürsünüz. Arduino taslağını bir yere ihraç edecek

LED örnek açtıktan sonra sahnenin görünümü
Seçtiğin. .Ccp yanı sıra .h verileri, diğer bağımlılıklarla birlikte otomatik olarak üretilecektir. Size etrafa bir göz atmanızı söylemek zorunda olmamalıyım, ancak dolgunuzu aldıktan sonra yayınlamanın yanı sıra derlemeyi hatırlamayın.

İhracat kroki düğmesinin hemen altında Comm Seri (Script) penceresi olacaktır. Arduino için sizin için volt limanını seçin. Comm limanınızı keşfettikten sonra, birincil sahne penceresinin üstündeki bit oynat düğmesine basın. Bunu yaptığınızda, ihracat krokunun olduğu yerde bir “Connect” butonu göreceksiniz. Bağlanın yanı sıra devam et. Şimdi birincil kontrol penceresinin üstündeki Sahne sekmesine tıklayın. Bu, küpleri manipüle etmenizi sağlayacaktır. Beyaz küpü ele geçirmenin yanı sıra çevre dostu birine çalıştırın. Eğer her şeyi yaptıysanız, iki küp çarpıştığında, LED ışığınızı görürsünüz.

Noggin’inizdeki vitesler şu anda idealdir … Eğer bir oyun motorundan IO’yu geçebilirseniz; Yapabileceğin bazı ciddi harika şeyler var! Ancak sadece yüzeyi çizdik. Hadi bu çevrimiçi gerçeklikte çalışalım!

Yarık girin

Satın almak için çevrimiçi dünyaya gitmek için, birkaç şeyin gerekliliği. Biri bir karakter denetleyicisidir, diğeri de yürüyecek bir şeydir. Henüz yapmadıysanız, oyun düğmesine bir kez daha vurun. Bu, dünyayı düzenlemenizi sağlayan her şeyi ayıracaktır. Oyun Nesnesi-> 3D Object-> Uçağın yanı sıra uçağı değiştirin, böylece iki küp yukarıda bulunur. Ardından, Arduino’yu açmanın yanı sıra OVR klasörünü OVR-> prefabriklerine genişletin. OVRPlayerController.prefab’ı seçin ve ayrıca sol üstteki birincil hiyerarşiye sürükleyin. Birincil sahne penceresinde oynatıcı denetleyicisinin göründüğünü göreceksiniz. Küplerden uzaklaştırın, ayrıca ideal el tarafındaki Müfettiş sekmesi altında, OVR Player Denetleyicisi’ndeki (Script) bölümündeki profil veri seçimini seçin.

Şimdi, Hiyerarşi sekmesinde Arduino’yu seçin, ardından da oynatın ve ardından bağlanın. Bir oculus rift bağlıysanız, eko-friendly küpüne aktarmanın yanı sıra arduino üzerindeki LED’i aydınlatabilmeniz gerekir. Eğer bir tane yoksa, aynı şeyi yapmak için ok sırlarını kullanın.

Çözüm

Peki bunu nereden tercih edebilirsin? Bize atlayan en büyük şey, dokunsal geribildirimdir. Bir küp yerine, bir duvara ya da masanız ya da o yapının bir şeyiniz var. Arduino, nesneye dokunduğunuzda veya çarptığınızda bazı yorumları etkinleştirin.

Kodun içine kazın ve her türlü hata veya iyileştirmeyi anlamamıza izin verin. Diğer bazı örneklere uyduğunuzdan emin olun ve ayrıca bir gösteri için aşağıdaki videoyu inceleyin. Birlik ile harika bir şey yaptıysanız, bize yorumlarda gösterin.

Leave a Reply

Your email address will not be published. Required fields are marked *