I am trying to do Character switching between two BP, CharacterA and CharacterB, but every time I press in this case Button Q, I switch characters but always go back to the player start position, it doesn’t remove old actors but keeps adding new ones.
I am a beginner so please be mindful of that, still learning, and trying new things. This setup might look ridiculous but it’s the best I could figure out. I really tried hitting on this for a few days but no solid results.
Issue #1: keeps spawning new actors without removing old Issue #2: When I switch I go back to Player Start Position
After that I want to add animations and particle so that switching is not so static but I’ll make another post about it if I can’t figure it out after fixing these.
May your day be blessed for taking time to help me out, for replying, for begin nice, I am new and been strugling on this for a whole week, watched so many tutorials and nothing. Thank you I truly appreciate it.
By the way did I do it right this time, look at the issue that I am facing.
Break the transform type variable, also split the Spawn Transform pin by right clicking on it and selecting the Split Struct Pin option, and plug in all the exposed components of the transform type variable except for the Scale one (meaning you should only connect the Location and Rotation values)
One more weird thing that is going on, only if you want, you helped me a lot but if you are willing to help me fix the rest, I am thankful from my heart. I am worried I might offend you from asking so many questions.
The camera is weirdly jumping, cause after these fixes, I am going to add animation enter and exit and particles, cause I want to do something like Transform from a Human to a flying Butterfly. It’s kinda cool. And this camera thing will cause issue for smooth transformation.
No I didn’t mean placing the node once after spawning and once again after possessing, I meant it’s placement should not only be after spawning but also after possesing, meaning it should just be after possesing and not before that.
Idk maybe there can be better ways to fix that, but if this is the result of our last approach, maybe you can consider activating another camera for the duration of the transition.
To do that, you’d need to create another actor and add a camera component to it. Rotate it with the control rotation just the way you do for the current camera, just don’t activate it. And after you destroy the actor, activate it by first, casting to it (or you can also use a reference if you set that up on Begin Play) and then using the Set Active node. You can transition back to the camera that’s in the player character’s BP once the possessing is complete.
Though I didn’t expect such an outcome to be honest
@VisAgilis I apologize I had to get off and didn’t reply, now it’s late, I will check it out tomorrow and see if I’ll manage to fix it somehow and pm you how it turned out. If we make it work, maybe we can share the setup for some other guys to find it useful. Thanks for the help.
Hey @ahkai_1, I wanned to try it out myself and just as I thought, the code should actually work!
Here’s a video showcasing the result:
Maybe there are some other stuff going on in your project. Try creating a new project using the third person template and implementing our code in the level blueprint. Hopefully you can spot the differences that way!
Yeah I transfered it and it does work, I’l figure something out.
However, anytime I change my character, the particles remain at the player start position, and I receive an error when I add a pawn node. Furthermore, my Play Montage nodes does nothing. I am not sure why; is it necessary for me to add something to the skeletal mesh component?
Attempts have yielded no results thus far. This is probably the final thing I have to do for this setup.
Start simulation > Character A > Exit animationA > Enter animationB > Character B > Particle > Exit animationB > Enter animationA > Particle > CharacterA = (LOOP)
More realistic-looking and fluid transition between two characters and I believe that the setup is essentially finished
I would call it Character Transformation Player Controller. This so far was realized for me, because of your help, thank you. I lack yet fundamental knowledge about blueprints.
You should also plug in the saved transform variable’s location component into the Spawn Emitter at Location node’s location pin instead of the actor location.
For anim montages to work, you should plug in the default slot into the main out pose of your anim graph. Open up your animation blueprint, navigate to the anim graph, do not go into any state machines and just stay in the main anim graph. Right click on an empty space, search for “Default Slot” on the menu that pops up, select the "Slot ‘DefaultSlot’ " option to place the slot node, then connect it’s input (Source) pin into an animation or a state machine, and connect it’s output pin into the Out Pose.