Possess pawn causes Vive controller to sat on ground

Hi this is a strange one. I have a level BP that possess a different type of VR pawn when that level starts. The only problem is the default pawn I have set in project settings leaves it’s Vive controllers on the ground. Anyone know why this is happening and how to fix it?

OK maybe I didn’t explain this properly.

a8c589f65ea403dc0256b9d9168968a7cde7a99e.jpeg
So this is the main VR Pawn I have in project settings. Lets call it pawn1

7dd8a5cd23072b40cebbb62ae840a277015044bf.jpeg
and this is the BP I use to possess the new pawn in the level BP. Lets call it pawn2

36f1d8f56ac1d9066e22c4ccc73b89d02039a9c6.jpeg
and then finally this is a picture of the result which is that for some reason pawn1’s controllers are left on the floor where it was possessed and you can see pawn2’s controllers being used as they should be. But Pawn1s controller shouldn’t be visible there.

If no one knows why this is happening is there another way I can have the pawns start that level without using posses?

Do you use UE VR template? Default Pawn here spawns motions controllers as an actors on BeginPlay() and attaches them to pawn. So on reposessing operation you need to reattach controllers to your new pawn with KeepRelativeTransform flag.
If you use another controller components in a new pawn, you should call DestroyActor() for each initial controller actor.

I’m not no. I’m using the Steam VR template here Steam VR Template - VR and AR Development - Unreal Engine Forums but I think that uses a similar spawning of the controllers you show above. You say I should “call DestroyActor() for each initial controller actor.” but how would I do that. I have the possess pawn in the level BP and the only reference I can call is a cast to node which doesn’t allow me to destroy besause there is no where to put the object pin.

I even tried using the below bool to destroy the actor but again being in the level BP I don’t know what to attach the object pin to.

Hi YuriNK can you please get back to me and let me know what you mean when you say “call DestroyActor() for each initial controller actor.” I’ve shown 2 examples that don’t work. If you don’t know please let me know so I’m not wasting my time waiting for a response. Thanks

I had the same problem. If you spawn an actor on level load there is no need for a default actor. Simply remove the default actor in “maps and modes” by setting it to none. That should fix your problem. Attached is a screenshot of my level Blueprint. I still use destroy actor to destroy the actor of the previous loaded level. If you do this for all your maps you can have different pawns for different levels without the previous one interfering.

Thanks for this turning this off in the maps and mode works. I wonder though why do you start off with an unposses and destroy as what is in the level BP can’t carry over to the next level. This is what I’m using and it works fine from one level to the next when I use different pawns.

Oh you´re right, thanks. Somehow in the process of getting this to work I was under the impression I need to destroy the previous pawn

[QUOTE=tcla75;604831]
can you please get back to me and let me know what you mean when you say/

[QUOTE]

So it should look like

GetPlayerPawn() -> Cast to VRPawn_Teleport (or whatever, the class of your current pawn)
VRPawn_Teleport reference -> Get Left Controller (or another name of variable reference to controller) -> DestroyActor()
VRPawn_Teleport reference -> Get Right Controller (or another name) -> DestroyActor()
VRPawn_Teleport reference -> DestroyActor()
GetPlayerController() -> Possess (new pawn)

It’s a solution for an official VR Template. It works if a project uses motion controlles in a separate blueprints actors, not a components of a player pawn actor.