I am trying to work on a ‘rolling ball’ game in Unreal 4. I have started a new level. However, I can only find 10 things in my world outliner UI - the pawn is not one of them. I want to adjust the torque on the ball, however I am unable to do this.
Also, what do I type if I want to cast to my player controller?
The problem is my pawn is invisible in the ‘editor’ mode (if it’s called that). However when I click ‘play’ there is a ball there I can control with WASD space. I want it to be visible after I leave ‘play’ mode so I can adjust its physics.
By default the pawn isn’t going to be in a new level, instead its automatically created when you click play. So you’ll have to place it there yourself. I don’t know if this is the cleanest way you can do it but it definitely works. I’ve written I small tutorial for you.
First of all find the pawn in the content browser.
Drop it in your level.
Open the level blueprint and destroy the player pawn actor, then create a reference to the pawn you dropped into the level and possess it.
If you did it right it should all work fine now.
For your second question I 'm not sure what your trying to do, from my experience you usually don’t need to cast to player controller, rather you just get player controller and pull everything from there, if you cast to player controller and use player controller as object it won’t work because the object is already a player controller.
So I do not see a pawn on your world outliner either but that is difficult to answer without more information.
Is the pawn added to the world ?
Is it falling through the map into Z kill ?
As for your second question you should be able to right click in most BP and start typing " Get player Control " and you’ll see the node your looking for.
Alright So here’s a clean way to do it. Just drop the pawn into the level and under the details panel set auto possess to player0. I think this is a new feature because I never noticed it in the past.