I’m trying to implement a portal system, I know is a common thing here, but, my problem is…
Once I’ve got the portal working, I managed (through another ue q&a :D) to make it so you enter the portal and skip through the other one no matter how rotated is the second one (using SetControlRotation), the problem is that now the player gets stopeed for a second when it gets ported making it kind of cranky and not pleasant at all, for example if you enter the portal jumping you just get ported to the floor without any inertia.
Here is the BP of the portal, the basics are: both portals in the same BP and they get placed in the map by the Construction Script via the variables PosPortalA/B and RotPortalA/B, once the FPCharacter overlaps one of the portals gets teleported to the other one location (applying the portal’s rotation).
If i get rid of the rotation (you enter facing north and exit facing north) it doesn’t happens this “stopping” frame, but this would cut a lot of utility for this portals.
Therefore I understand the problem is in the “SetControlRotation” but I couldnt manage to make the rotation happen any other way.
Thanks in advance any advice given.
I was also trying to get a smooth portal experience, and noticed that using the teleport node works much better for this:
I believe this node was made for us blueprint paupers, and makes sure that everything happens in one frame. You may go back to having problems with rotation again, though…
Even though I haven’t resolved the issue yet, I’m quite close at the moment, I’m using Teleport as you sugested, but the most important part i think, is the use im giving to “Launch character”, I’m using it in this way:
Every time you enter the first portal you use Launch character to apply a force to the character in the oposite direction so it should become neutral (stopped mid-air).
Once the character is stopeed with no forces pushing it to any direction, it should be easy to apply a new force in the direction desired using another Launch character and the speed (saved when you enter the portal) rotating the vector.
Anyway this still doesn’t works and I’m not quite sure why, if I get to understand the problem I will post it here.
Still looking for help though.
I know this is a complete mess, but I’ll try to explain what I’m trying:
Here you can “see” the nodes
I’m gonna take a look at this, but in the meantime, I’d recommend trying it without propulsion and see if you get a smooth transition. If it doesn’t work without propulsion, you’ll never fix it with…
( What I mean is, trying with walking first, I think the teleport takes care of normal character movement ).
EDIT: You might try putting your destination rotation into the teleport node also.
The rotation is ok now, if you go walking (on the floor) the portal works just fine, you exit through the other portal perfectly rotated and in the direction you should, the problem comes when u come with some kind of Z-axis height, th transition just doesn’t feel right.