A RigidBodyFirstPersonController
exists in each Scene. This establishes the "start" position for the player in the scene. Also, this is the "respawn" point for the player after a failure. We simply call Scene.reload
.
The RigidBodyFirstPersonController
has a "Tag" set as "Player"
The RigidBodyFirstPersonController
has the following Scripts attached:
The Altar object has a "Tag" set as "Altar", the 'isTrigger' asserted (in the Collider) and has the following scripts attached:
Internally, the Artifacts are referenced as artifact_ego
, artifact_faith
, artifact_courage
. It is important that they are lowercase. These "names" must be entered in each Artifact's Artifact Name
property of the ArtifactPickup
script component.
For Fall Damage the Player needs FallDamage.cs
attached. There is a property Max Velocity Y
that can be adjusted.
The script ArtifactPickup
must be applied to each Artifact object and the object must have 'isTrigger' asserted.
In the Unity Build Settings
the Scenes must be listed.
The Player needs to be "Tagged" as 'Player' and the following scripts attached:
- Rigidbody First Person Controller (part of the FirstPersonController)
- Player Inventory
- Fall Damage
- Player Health
Script LevelTeleport.cs
must be attached to the Tele-Portal.
It also has a Property that must be set; the name of the level (Scene) to which this Tele-Portal takes the player.
The Tele-Porter must be set 'isTrigger' in its Collider.