FPS controller, in wrong (far off map) position at game start
I am a complete n00b and have just completed my first terrain. I added grassy texture, raised some hills here and there, built a couple of structures, threw some trees at it. Everything was going quite well, I was having a blast walking around my model world, until... I learned how to raise the default terrain height (using a 3rd party script RaiseHeightmap) so that I could put a "sea level" water layer below my land form and sink lakes/pools into the water layer with terrain editor. Then I tried to walk around in Play mode some more to enjoy my new canal and lake system.
Play mode used to work just fine, up until I moved the terrain up i.e. changed the default terrain height. What now appears to be happening is that the FPS controller keeps initialising at the old terrain height, so my player starts out looking up at the bottom of the world far above, then immediately falls into endless space as the game starts. I have dragged the FPS controller up above the new terrain height, but whenever I press Play, it snaps right back to the original position and the Big Drop commences. Aaargh!
What I need to know is how to force the FPS controller to remember the new location, some 25 Y units higher than the default. Dragging it in the scene editor doesn't seem to be enough. This is probably a super-stupid question, but I'm new and despite googling I have not yet found a clear answer. Help...
[UPDATE] It occurred to me to wonder whether the FPS character has to start at grid level, so I lowered the whole world carefully until the terrain was just about at gray grid level and the water was below grid. Deleted my FPS controller and added a new one, positioned it just a little bit above the "grassy meadow" of my terrain -- viewed it from various angles to make sure -- and started the game. Boom, I'm looking up at the bottom of the world from a large distance below it. This is driving me crazy...
Answer by Tazling · Jan 28, 2017 at 07:32 AM
I think I finally figured this out (sort of). There were 2 cameras in the scene, one of which I was not aware of (had created it by mistake I suspect, it was a child of Terrain). So I deleted that 2nd camera, which seemed to be the one located miles away in space below the world. Then I found that the FPS Controller and its associated camera (child of FirstPersonCharacter) had somehow got separated from each other, which led to very strange effects when trying to move or look around. With patient manual relocation I got the two of them co-located again and (whew!) after hours of frustrating headbanging I finally can walk around my scene normally once more.
I sure wish Unity had Blender's super-quick "snap cursor to object, snap other object to cursor" method of co-locating any two objects. I have been searching for a similar feature but have not found it yet.
Your answer
Follow this Question
Related Questions
fps controller falling off terrain 0 Answers
chacacter teleporting outside of terrain 0 Answers
FPS character walking below the terrain? 0 Answers
Runtime terrain painting with SetAlphamaps = lag 0 Answers
How to destroy Terrain-Tree-Collider? 3 Answers