12-19-2021, 01:09 PM
Hello, I'm having trouble figuring out how to go about limiting a raster effect line scroll to a certain part of the world. I understand the way raster effects work is screen based. But how would I go about having the effect only appear on screen when the world is at a certain position? Example: https://i.gyazo.com/8c9cb92f7c9108795c7f...5cac6a.mp4
As you can see in the example the effect on the grass looks fine when the camera is low to the ground, however once you move up the raster effect is ruined as it is no longer covering the part of the background that it was once scrolling. Currently the code for this effect is pretty simple
Any help with this would be much appreciated. Thank you once again.
Cheers,
RBK
As you can see in the example the effect on the grass looks fine when the camera is low to the ground, however once you move up the raster effect is ruined as it is no longer covering the part of the background that it was once scrolling. Currently the code for this effect is pretty simple
Code:
void GrassLineScroll(int line)
{
float pos = -1;
if (line == 0 ) {
TLN_SetLayerParallaxFactor(2, 0.50, 1.0);
}
if (line == 167 ) {
TLN_SetLayerParallaxFactor(2, 0.80, 1.0);
}
if (line == 180 ) {
TLN_SetLayerParallaxFactor(2, 0.90, 1.0);
}
if (line == 192 ) {
TLN_SetLayerParallaxFactor(2, 0.95, 1.0);
}
}
Any help with this would be much appreciated. Thank you once again.
Cheers,
RBK