Surface Manager with CTS Profile

nathanj

Active member
Hi Justin,

Edit: The issue I was having was that the textures mapped to my Terrain component did not match those on the CTS profile. making sure that they were synced resolved the issue. I'll leave this here just incase it's helpful for anyone else.


Having an issue getting the SurfaceManager to work with Procedural Worlds CTS. Have you ever looked at this?

On the CTS profile, in the Optimisation section, there is an option to Strip Textures. This removes the textures and reprints them as a CTS material. If I deselect this I can get some of the textures to work with the SurfaceManager however some of them cause errors:

Code:
vsDirt1 (UnityEngine.Texture2D)
UnityEngine.MonoBehaviour:print(Object)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:GetTerrainTexture(Collider, Vector3) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:805)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:GetTerrainSurfaceType(RaycastHit, Collider) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:766)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:GetSurfaceType(RaycastHit, Collider) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:317)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:GetSurfaceEffect(RaycastHit, Collider, SurfaceImpact, SurfaceType&, Boolean&) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:283)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:SpawnEffectInternal(RaycastHit, Collider, SurfaceImpact, Vector3, Single, GameObject, Vector3, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:257)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:SpawnEffect(RaycastHit, SurfaceImpact, Vector3, Single, GameObject, Vector3, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:221)
Opsive.UltimateCharacterController.Character.CharacterFootEffects:FootStep(Transform, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterFootEffects.cs:397)
Opsive.UltimateCharacterController.Character.CharacterFootEffects:DetectBodyStep() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterFootEffects.cs:324)
Opsive.UltimateCharacterController.Character.CharacterFootEffects:FixedUpdate() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterFootEffects.cs:303)

One case is if I just on the texture the player doesn't register landing and stays in a Jump state.

Any ideas of how to approach this?

Thanks again,
Nathan
 
Last edited:
Top