In this video, we're going to load the actual environment we're going to use in the game. We now have a if you look at version three folder, and the game dot j s, there is now a load environment method. And that's loaded in the FBX. exe file environment dot SPX. The first thing we do in that is allow it to receive shadows. scale it down slightly 2.81 would be exactly the size that it was created out.
Give it a name and we iterate through all the children of the of the FBX. exe file is a mash and includes the name main. And we set cache shadow receive shadows to true inclusive Name proxy, which we'll come to in the next video, then we set each material to be invisible material dot visible equals false. When we do that, we get that and I'm sure you can spot a problem. Namely, our character is walking through our set. Now we could create a ray caster based on the geometry of the environment.
The problem is, there's an awful lot of polygons in there. And so the ray caster has to ultimately find every single one of those polygons to check whether or not it's in the direction of the ray There is a way out of that. And in the next video we're going to look at how we resolve that problem.