NIKOLAI: Only the sky's the limit in the virtual world
as we build.
But when you start moving around in the physical world
at the same time, you first have to think
about how to make the virtual and physical coexist.
In the Designing for Physical Boundaries episode
we saw how physical limits can impact the augmented reality
you are in, and how they can prevent you from going places
in the virtual experience.
My name is Nikolai, and in this episode
I'm going to show you how to deal with size
limits in the virtual world.
When you are building augmented reality experiences that
allow the users to move around, you also
have to think about the size of the virtual experience you're
building.
If your world is very small, the user
may accidentally walk out of it.
As a developer, when the virtual world
is smaller than the physical world,
you've got a challenge to make sure
that the users stay within it.
That is you need to handle the virtual boundaries.
For example, if you create an icy world
with a single and small ice flow for your uses penguin,
an immediate issue is that it's tempting for the user
to jump off of it.
Since the virtual world is smaller
than their physical room, what do you
want to happen when they cross the limit of the virtual world?
There is a simple technique that keeps the user on the ice flow.
Let the ice follow the user.
You can accomplish this by putting an invisible wall
around the virtual world.
When the user runs into that bounding box and keeps going,
they move the wall and the whole world ahead of them.
It is also possible to make virtual objects appear
solid to the user by adding colliders around them.
Pushing against the collider will also move the whole world.
However, if the collider is placed poorly,
it can make parts of the virtual world become inaccessible.
If the user walks into a solid rock on the ice,
they will effectively push it in front of them.
While a solid object can cause places to become inaccessible,
it does prevent the user from walking straight through it,
which is neither natural nor great if the object is
large and hollow.
The user may then get lost inside it,
and you must make sure that they can find their way out of it
again.
If they continue to walk, they may eventually push the rock
through a solid physical obstacle,
such as a wall or a door.
If you are not careful about aligning the virtual world
with the physical world, your users
could be at risk of inadvertently walking out
of the room or into obstacles like walls.
So you should design to minimize that.
Since the rock is not pushed onto the other side
of the physical obstacle, it is going to be hard for the users
to get to it in the future.
There are workarounds for this situation such as the clutch
and teleportation modes.
We discuss these in the Designing for Physical
Boundaries episode.
As an alternative solution, you could instead
allow the user to jump off the ice,
and gradually let them know that they're exiting the experience.
In this example, we let the physical world bleed through
as the user approaches the boundary of the virtual.
It quite literally informs the user
that they are leaving the virtual space,
and entering reality again.
It also makes it really easy for them to go back again.
They can simply turn around and walk back
where they came from to return to the virtual experience.
Finally, you could completely eliminate all these issues
by procedurally extending the size of the virtual world
to fit the physical surroundings by using the depth sensor.
As a developer this does entail more work,
but makes an experience that works in more places.
In this example we are adding blocks
as the user moves beyond the limits
of the current populated zone.
In the penguin game this same idea
could be used to automate the generation of ice.
The user would then never run out of places
to move to as their icy world will be boundless.
It's not only the physical world that constrains us.
The virtual world can do that too.
You can put a fence around the virtual world,
let the world follow the user, or procedurally extend
the world as the user moves around.
Somewhat easier to implement, but harder to use.
And you have to consider what's best for your situation.
There may also be other ways to handle these edge cases,
and we'd love to hear what you've come up with.
So visit our Google+ community, and join us in our journey.
We are excited to see what you will build with Project Tango.