Posted: 31st Mar 2008 21:20
No, not that kind of portal, I'm taking about the one's seen in Prey and Valve's Portal.
Posted: 22nd Apr 2008 18:09
Back again, this portal thing is driving me mad. Can anyone give me a nudge in the right direction cause I have no clue where to start. I think it would have something to do with matrix math and shaders for mapping the portal texture onto the portal, I was trying to use the instructions in my first post, but I'm not sure if most of that could be done in DBP or how to do it.
Posted: 22nd Apr 2008 19:09
Use a system like this:

+ Code Snippet
cx# = camera position x()
cy# = camera position y()
cz# = camera position z()

px# = object position x(portal)
py# = object position y(portal)
pz# = object position z(portal)

radius as float

If ((cx#-px#)^2)+((cx#-px#)^2)+((cx#-px#)^2)<=(radius^2)
position camera dx#,dy#,dz#
endif



Explanation of variables:

+ Code Snippet
portal = object number of portal
dx#,dy#,dz# = destination position



Actually quite simple, isn't it.
Posted: 22nd Apr 2008 19:11
Err... what would that be used for?
Posted: 22nd Apr 2008 19:12
When you get close to the portal it teleports you.
Posted: 22nd Apr 2008 19:15
I still trying to create the portal.