Teleportation trajectory

Hello

I am working with a vr project teleportation and i have encountered a problem that i have been solving for days. The problem is to get a teleportation beam from the right controller to the teleportation location. I have managed to get the predicted projectile path, but it doesn’t show in the build. I have been thinking about putting a particle system between all the debug spheres to make a good arching movement. Google doesn’t help me so i have to ask here :frowning: I can get the starting position and the velocity, i just need to put the particle systems between.

What are the visuals you are after? Do you want it to look like a beam? In the past I got decent results using Cascade’s beam but haven’t tried anything in Niagara - it’s quite new and the documentation is lacking atm. Pretty sure you can make neat beams there.

Another solution for a good looking beam is to use a spline, place spline points at path positions and generate spline mesh components between the points. Since you’ll be using a material for this, you have pretty much unlimited control over the visuals. Can be combined with particles, too.

edit: doesn’t one of the VR examples comes with a beam like that already? (a genuine question)

my goal is to either make a nice arch like in the vr template, or replace the debug spheres with meshes. i tried to follow your way, but i got a bit stumped. now i have a for loop with break, which makes spline points for each out path positions the node generates. I have tried this before but i have faced 2 problems: either i get 1 cube to spawn or multiple cubes that don’t move dynamically with the controller and just keep re spawning

.

edit: answering your question: Yes it has, i tried to fuse the blueprints, but with no success. I would like to refrain using the vr template in our project.

i have managed to get this far. The problem is that it keeps spawning the cube meshes all around when you move the controller. It seems that it doesn’t want to complete the loop properly :confused:

No need to reinvent the wheel.

I’ve opened the VR template (for the 2nd time in 4 years) and they’re using splines. The actor is called BP_MotionController and the entire logic of the spline + spline mesh components is the Update Arc Spline function.

This bit cracked me up, though:

The magic number with a question mark is adorable!

It was clearly put together by someone with no respect for screen real estate or an owner of a 3x 65" 4k displays…

hey i said in the comments that i tried to fuse the blueprint tin the vr player pawn with my own but with no succession.

Ugh, tough customer :wink:

Image from Gyazo

Epic’s version destroys and recreates components on Tick. This version is probably 17 times more efficient as it does not. Thank me later.

I did not test it for bugs, so there might be something odd.

Good luck!

1 Like

The clean-up loop should probably be moved a bit earlier but is seems to be doing what I wanted an is still fully dynamic.

If someone feels an inspiration for making a Peeing Contest game, this will be perfect. :slight_smile:

still testing it, what is the SPMs array type? because i can’t connect it to set start and end points

Spline Mesh Component. It’s a variation on static mesh component but can be deformed using a spline. You give it start & end and optional tangents the UE4’s interpolation magic does the bending.

ah thank you. well it works but it doesn’t want to add the material i put in the node. how did you do this?

well i found a bug in it. there is a functionality for the teleportation beam to bounce of walls. i got that but it doesn’t work anymore. i will try to solve this but if you have any ideas im more than happy to talk about it

You may (this is usually done automatically) need to flag the material as Used with Spline Meshes (a tickbox in the material itself); you can then assign this material in the Add Spline Mesh Component node.

A bug? I did not include any addition functionality here bar the beam generation. I admit I might have lost one index somewhere there or a rogue spline mesh (even Epic’s staff uses a magic number to fix stuff after all… :wink:

Not sure how the bounce is done with the prediction node off the top of my head. I know how to transform vectors manually but there’s most likely an automated way here. Consider looking into the way it’s done in the VR project.

I might have peek later on out of sheer curiosity.

I’m still not sure why you just did not duplicate / merge the whole controller and trim it to suit your needs. On the other hand doing it from scratch is definitely a better way to learn!

yeah i did something very wrong with the bounciness. i restored to an old version of the project and added the nodes that you suggested. now it works perfectly. marking as solved

Awesome, good luck with the rest!