Pawn always spawning at world origin.

Hi,

So, I have this VR player that has camera as the root component. (To rotate it easily while playing in room scale).

But it always spawns at 0,0,0. IT does not care if there is a pawn already in the map or even PlayerStart.

What can I do to spawn it at specific location?

image

Sounds like you’re not possessing it.

image

How’s this? Also, without knowing more the Game Mode setup, hard to tell.

It is auto possessed. and it works perfectly fine if for example the “scene” object is the root object.

What could be done in game mode to solve this?
I’m using the default game mode for the VR template. did not change anything just yet.

Let say it is the default VR template and I just create another actor as the VR player. That has code only for hand tracking.

When you work with Pawns, you generally want a colliding component as the root, otherwise the movement component has nothing to latch onto; we then use a movement component to help the pawn move (controls implementation can even live there). Try reading up on Control Rotation to see how it affects pawns / cameras. Having a camera as the root of the pawn is… uncommon.

Thank you for replying.
My project is basically, you have a large walkable area in real life. and you walk with your legs no controllers needed. But when you want to go up you have to press a button with your VR hand.
But what if the map is larger than the walkable area? then I want to press a button to rotate the player 180 degrees so that you have your walkable area again to use and you can move further.

That’s precisely what controller, movement component, and root collision is for… :person_shrugging:

then I want to press a button to rotate the player 180 degrees so that you have your walkable area again to use and you can move further.

How did we go from pawn possession to this?! What’s stopping you from rotating the player pawn?

No idea. but the camera and the pawn are not rotating for me. for some reason

We can’t possibly guess how you set things up. To control a pawn (even without a custom Game Mode or Player Start), all that is needed are 2 things:

  • have a pawn and set it to auto-possess by the player controller
  • drop it the level

That’s all. If you add Game Mode to the mix and a Player Start(s), things change a bit, ofc. You actually get more control over what spawns where.


The most mundane setup for a pawn that can move over geometry and has sliding collision:

A character could also work great, perhaps even better. You can also have the pawn itself utilise Control Rotation. This is, by far, the most common method. The element at the root must have blocking collision, otherwise this:

you have a large walkable area in real life

Will definitely not work OK. There are situation where you do not need collision, if the VR pawn can only teleport from one location to another, and never actually traverses any terrain, there will be no need for what I suggested.

1 Like

Thank you I just figured it out. loooool

I had the math correct and everything but it did not work because I did not have floor collision and no nav mesh volume. XD

Such a noob me. All these years of experience and work. failed me. lol

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.