How can you tell if an object is in a shadow?
I saw ports code but it never works for me.
function isPointInShadow(%pos, %ignore) {
%ray = containerRayCast(%pos,
vectorAdd(%pos, vectorScale(getSunVector(), 250)),
$TypeMasks::StaticShapeObjectType |
$TypeMasks::FxBrickObjectType |
$TypeMasks::VehicleObjectType |
$TypeMasks::PlayerObjectType |
$TypeMasks::ItemObjectType,
%ignore
);
return %ray !$= 0;
}
Yes, I have the other codes he has for it. It just keeps giving me a true statement. In shadow or not.