Quantcast
Channel: Questions in topic: "footsteps"
Viewing all articles
Browse latest Browse all 164

how to check what material player stands on

$
0
0
i try to do footstep system by raycasting here is script that i made public float distance; void Update(){ Raycast hit; Ray footstepRay = new Ray (transform.position, Vector3.down); If(Physics.Raycast(footstepRay, out hit, distance)){ If(hit.collider.tag == "terrain"){ } } } here is the question : how to check the material of terrain layers so that i can check which material player stands on?

Viewing all articles
Browse latest Browse all 164

Latest Images

Trending Articles



Latest Images