Sunday, September 11, 2016

A holographic pit trap

As one of my first projects for HoloLens I decided to build a pit trap (in case the video below isn't loading).



I went through various versions of this. Here is an earlier attempt.

First, I picked up some traps assets from the Unity asset store. Then started messing around with a bunch of options. With Unity I spent a lot of time getting the center of the object positioned at the top of the pit so I could place the pit on the floor, and then sizing the various assets.

Once I added a trap door, I spent way too long adding a workable gravity hinge and a motor to close the lid based on your proximity to the pit and then starting and stopping the spike animation at the same time.
I spent even more time with this not working before I sorted out that I needed a collider on the pit GameObject before I could use the TapToPlace script to move it, and then get my collider to not block the pit door from opening, and making sure the collider wasn't hidden behind the spatial map once I placed it, and on and on.

By far the biggest challenge for this was working with spatial mapping and placement. I'll have a lot more to say about this later. Initially, I tried to remove the spatial map vertices where they intersected the pit and have the spatial map do the occlusion — to give the illusion that the pit trap was actually in the floor. Though I think I now understand why it didn't work, I wasn't able to sort this out at the time. So, instead I added quads with an Occlusion surface material along the lines of the HoloLens Academy 230 project.

Finally, I used the web cam to take a picture of the floor near the pit trap and then mapped that to the surface of the door to make it blend in.

4 comments:

  1. Emperor Casino | Shootercasino
    The Emperor Casino is the finest establishment of 메리트 카지노 쿠폰 gaming. It is your place to keep 제왕카지노 all your favourite games and the latest promotions in safe and secure  Rating: 3.5 · ‎7 votes 인카지노

    ReplyDelete
  2. Hey guys! If you don't want to waste your time and money for search good service for essay and homework, you can paperrater reddit ask this guys for help! They really know how to do it! So check this masters thesis writing service and be ready for help! Enjoy!

    ReplyDelete