This video begins with a challenge.
What I'd like you to do is create your own experience which looks similar to what I've got on the screen.
So I've given you a ghost model that is attached to this lecture.
And I'd like you to make your very own ghost appearing at.
Where are they going to appear to walk through walls.
You can see that I've used a Mocca in this case to help position and align the real and the old Mantid
so pulls this video now.
And when I come back I'll show you how I put it together.
OK so let's take a look at how I've put this together.
Now what I did was basically repurpose the zombie example.
And that's because we needed a spoon.
And we used a occlusion Cline and a shadow plane.
So let's have a look at the trackable the trackable in this case of use the bare marker that we've used
before doesn't matter which one that you use.
But let's just preview where that is in my scene and you'll see if I just move around a little bit you
can see I've got an occlusion playing here now representing the wolf so that when I put the bag Mocca
up against the wall and look at it through my mobile device then it's going to project this occlusion
flying up here so that anything behind it it's not going to show through.
And the occlusion plane is this first one attached to the trackable which is up here said before the
zombie we had it sitting horizontal and now it's just at 90 degrees on the X then the shadow plane is
the same shadow plane that was in the zombie one sitting very level with the marker itself.
Now the ghost model that I've given you I've set that to be the Spooner's character.
So the trackable is setting the spawn as it's drawable object the spawn of being the same spoon with
the zombies if we have a look at the character.
You can now say is set to the ghost.
Now the ghost object if I just drag that into my scene on my trackable I've made it oversized So it's
very large and it's being included there so you can't see it just get behind here.
So all it's doing is just walking forward and you can see that when it goes behind the Cluedo you can't
see it.
So that is the effect that you get.
As it walks forward and goes through.
Now the other thing is the offset the plane which represents the wall which is aligned with the very
back of the Mokka the ghost itself is sitting away and back from it.
So it's Zayde position in this case of minus three point seven one.
And again the code for the sport of which is the same as I left it with the zombie ensures that when
that character is instantiated it is instantiated at its own position that you sit on that particular
pre-fab for it.
You'll also notice that I've changed the angle from 90 degrees to 10 degrees.
In this case because when you've got these ghosts coming through the wall 90 degrees is just too much
of an angle and then I can walk along parallel to the walls which is not what you want.
OK so from here.
Let's just run it in the editor.
And it's not the best at the position I've got it here but you can see it in the same view that now
we are spawning these ghosts and this morning lot behind the MoCCA and then moving forward.
So when you put that up against a wall or something they appear to be coming through that walls if I
put my hand at the back of the Mokka then they come through and they don't Appia as I go through that
occlusion line until they're in the middle.
OK so that is how you would do a ghost.