Does anyone know of a script that tracks a characters x,z and also follows the surface of the terrain to place onto a plane blob shadow?
Trying to get rid of the projector blob shadow.
Thanks in advance!
make a corresponding texture and use a vertical line raycast and position it. just be aware that it won’t deform with the underground and especially not work on cases where different objects would fall into the blob cast area (the shadows would basically look like guild wars ones which behave exactly like these, cast only onto the mesh below the char)
any specific reason you want to get rid of blog shadows?
got a code snippet of that?
yeah I want to get rid of the extra rendering layer.
You can use a raycast or linecast to measure the distance to ground from the object:-
var hit: RaycastHit;
var distanceToGround: float;
if (Physics.Raycast(transform.position, -transform.up, hit)) {
distanceToGround = hit.distance;
}
You can then use this distance to position the shadow object, which will just be a plane with the right-shaped shadow on the texture.
thanks a lot I’ll use this as a base to get started.