Developing A Portal Gun In Roblox

I’ve seen some of the latest posts and technologies that have been discussed on roblox dev forums and everyone coming together to accomplish and helping tasks.

I got inspired by @EgoMoose through this forum post.

As I am an average roblox scripter and can only script basic roblox datastores and a beginner level of scripting knowledge. I can barely wrap my head around on making a portal gun.

I was wondering if it is possible to shoot a raycast onto a wall. And create a small part that holds a round viewport frame or something similar to create the portal gun effect. The part would be really close to the wall, It will give the illusion that its on the wall. That way, the player can handle a portal gun.

I don’t think it’s possible to create a full portal gun on roblox yet. We would have to look into keeping the players momentum and appling a way that the player won’t glitch out through infinite falling. Aside from the bug that makes the viewport frame blurry from up close. We could get really close to making a portal gun.

If you guys can help me figure out on how to project transparent parts with round viewport frame using raycasts onto specific surfaces while calculating and adding a thermal velocity onto roblox characters and figuring out the momentum glitch and the blurry viewport frame glitch. We could make a really close portal gun into roblox.

I’ve had an idea of getting the location of the raycast hit and checking to see if its the right material. Then a part with the right size will be created on the wall and inserted a viewport frame onto the part and create that illusion.

I’ve been trying to do that but I do not understand how @EgoMoose did that. If you guys have any suggestions, post them down below.

Thanks

10 Likes

Everything with it is possible. I’ve been able to get the portal to work before but not the cropping effect. The physics? Not too difficult, although it may need some custom physics workarounds. I’ll be back later to help with the portal.

3 Likes

This reply to the above thread has a place file showing the inner mechanics of this kind of thing (without the “portal gun” part)
I recommend having a look at it if you haven’t already.

2 Likes

I have managed to get the RayCast part working. I can shoot a raycast and get its position. I’m currently trying to figure out the portal mechanic of the entire thing.

1 Like

Have you seen the power of transparency 0.999 glass unions?

A useful thing with raycasting is getting the normal or surface, it is a unit vector giving info about the surface that it hit and can be used to angle anything to a surface.

18 Likes

Thank you for the advice. I can use your method of transparency glass unions and viewport frames to achieve the thing that I needed to figure out. Thanks abunch!

4 Likes

Please send the end result when it’s done, I would love to see it in action! :smiley:

6 Likes