I want to make a Portal for Multiplayer for a train that goes through the level infinitely by passing through the window, but i want it so the train doesn instantly teleports to the other portal but continually passes through it. Anyone know how to make that it passes through bit for bit?
Not enough information.
- What do you mean with “infinitely”? (My English may not be the best.)
- You mean, you can see both portals at the same time (from a third view)?
- How does the portal look like? What is “behind” it? Is it just a black hole leading into a mountain or something like that?
Screen capture - 6abcf849de37cc5df0379de05b7488a6 - Gyazo a portal like in the game “Portal” i did make a gif to show you waht i meant with infinitely. the guy keeps infinitly walking straigh ahead.
I suppose this is quite difficult, so this is my approach.
Surround the portal very narrowly with a collision box. When something enters this box, it is duplicated and the clone is transformed to the portaled position. When the cloned object leaves the box at the other portal, find out which of the two meshes is needless and destroy it.
So the object that shall be portaled just goes into the wall and the part behind the wall is not visible, so you cannot see that it is actually doubled. Therefore it is the easiest solution for the portal to be black.
I assume that you do not need the following aspects:
- If you really want to be able to look through the portal (like in the game “Portal”), then you may need to project the corresponding viewport to the texture of the portal.
- If you can watch behind the portal (e. g. it’s only a wall and you can go into the room behind this wall) you have to set the train’s material transparent depending on the pixel position – there are corresponding functions within the material editor.
Hope this helps, perhaps there are better ideas.
If you need more help, just ask for in a comment. If your question is answered, you can mark it as solved