The GroundSurface
property of the PlayerController
class provides information about the surface the player is currently standing on. It returns a Surface
object that represents the characteristics of the ground beneath the player.
The GroundSurface
property of the PlayerController
class provides information about the surface the player is currently standing on. It returns a Surface
object that represents the characteristics of the ground beneath the player.
Use the GroundSurface
property to access details about the surface the player is standing on. This can be useful for determining the type of surface, which might affect gameplay mechanics such as movement speed or sound effects.
// Example of accessing the GroundSurface property Surface currentSurface = playerController.GroundSurface; if (currentSurface != null) { // Perform actions based on the surface type Console.WriteLine($"Player is standing on a {currentSurface.Type} surface."); }