Within a for loop, I:
- Create a new Transform() and give it a random origin point.
- Set my RayCast to that transform using setglobaltransform.
- Print getcollisionpoint of the RayCast.
However, the coordinates from getcollisionpoint always equal the starting position of the RayCast (except for the y coordinate, which has changed to the floor where it is casting.)
Does anyone know why this could be happening?
var new_t = Transform(Vector3(1,0,0), Vector3(0,1,0), Vector3(0,0,1), Vector3(randi() % 100,50,randi() % 100))
$RayCast.set_global_transform(new_t)
print($RayCast.get_collision_point())