0
\$\begingroup\$

I have got the hang of basic construction, terrain modification, applying materials, placing trees, etc. I have created a water plane, positioned my terrain above it, and am able to sink lakes and pools, and raise hills and mountains. Built a couple of primitive structures too.

Initially (before mucking about with the Y position of the terrain) I was also able to invoke Gameplay mode and walk around my game using FPS Character Controller. I could walk into and out of my structures and hike over the hills and valleys of my terrain.

However, since changing the Terrain Heightmap to make the "sinkhole" (negative altitudes) work, I am having the strangest trouble with my FPS Character Controller. I position it at a reasonable height above the terrain, and everything looks fine in Editor mode; but when I start Play mode my FPS character starts out miles below the world, looking up at the underside of the terrain.

So far nothing I have tried will make the FPS Controller start in the location where I have dragged it in Editor mode. I have tried Saving Scene and exiting and reloading. I have deleted and recreated the FPS controller. No matter what I do, it persists in initializing itself in this oddball "way below the world in outer space" location.

I have googled diligently but have not found any mention of this problem. Presumably I'm skipping some important step, but tutorial videos don't offer any advice beyond "drag the fps controller into the scene and it should work."

\$\endgroup\$
1
\$\begingroup\$

I believe I have figured this out by hit and miss. The answer was that there was an (accidental) camera attached to my Terrain. I have no idea how that camera became a child of Terrain (almost certainly n00bie operator error), but that's where it was hiding. With 2 cameras in the scene, the behaviour of FPS was inconsistent and bizarre; I found that checking and unchecking the Camera box in the Inspector pane for the FPS Character switched between the orphan (miles away in space) camera and the FPS camera!

After finding and deleting the unwanted camera, the FPS movement behaviour was still bizarre -- mouse-look movement caused an orbiting motion. I found that this was because the camera had become displaced from the controller game object. I could not find a simple Blender-like way of snapping two objects together at their centroids, so I patiently co-located them manually. Once they were co-located again, the parent relationship worked properly and the camera followed the FPS controller, mouse look worked normally and I could once again walk around my mini-world.

\$\endgroup\$
  • \$\begingroup\$ To ease re-centering a child object on its parent in future, just type 0, 0, 0 into the position fields of its transform component. This places it at the parent's origin. \$\endgroup\$ – DMGregory Jul 15 '18 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.