Experimental Terraworld Adapters

Terraworld is a paid asset that allows you to generate huge terrains with the help of satelite maps. You can create stylistic or realistic environments.

TerraWorld – Automated Level Designer | Terrain | Unity Asset Store

The terraworld adapters makes the Nonon Zone Character Controller ready to use for that asset.

Functionality

In the “Assets –> NononCharacterController –> Scripts –> Adaptors” folder you will find the following two scripts

  • TWPlayerInteractions: This script sets the player to the scene and makes it interactable with objects. This lets the player collide with Trees, Rocks etc.
  • Experimental: All lines are commented out. To use the adaptor make this steps:
    – Add the script to the player prefab
    – Uncomment the blocks with /* */
    – In the “InteractiveTargets.cs” file from Terraworld delete the pragmas “#if UNITY_EDITOR” and “#endif”
    – That’s it. Generate a terrain and playe a player with “Add player with dependencies to scene”. Adjust the spawn points and hit run.
  • TWSunControlNetwork: This script synchronizes the sun between the server and all players in the scene in a multiplayer setup.

    Experimental: You need to make different methods public to work for this. To use the adaptor make this steps:
    – Add the script to NononZoneGameControllerNetwork object in the scene or any object that is not dynamic (create an empty one if needed). Add a NetworkObject on it as well if asked.
    – Uncomment the blocks with /* */
    – In the class TimeOfDay.cs make the method “GetScript()” public
    – Add the methods below to the class on line 274 and the sun will be synced to your players and set correctly.

public void SetSunSteps(float sunSteps)
{
_SunSteps = sunSteps;
}
public float GetSunSteps()
{
  return _SunSteps;
}


0 Comments

Leave a Reply

Avatar placeholder