Page 1 of 1

portal

Posted: Sat Sep 24, 2016 4:03 am
by RayB
Hi again,
Having trouble using the portal object. Saw some posts and minmay's response about the 'onArrival' hook but when I put nothing in the hook for my definition and walk through the portal, the screen turns to white (is there a way to stop that) and the game locks up. I cannot move. It doesn't say the game is completed but acts as if it is. I have tried fading the screen back in and using a teleporter but that did not work either, the game still locks up. I have also tried disabling the portal component and that seems to work as far as not locking up the game but sometimes when I look through the portal I see the walls but the coloring is all funky. Bright green floor etc.
Any suggestions?

Re: portal

Posted: Sat Sep 24, 2016 4:54 am
by minmay
To undo the effects of entering a PortalComponent:

Code: Select all

GameMode.fadeIn(0,1)
GameMode.setTimeMultiplier(1)
GameMode.setEnableControls(true)
The "portal" shader only works usefully when a model with an enabled PortalComponent is in view. So if you disable the PortalComponent but leave the portal model there, it will look very strange and bad.

I don't understand why you're using the portal object in the first place if you don't want PortalComponent behaviour...