x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Switch between third person and first person characters

I'm using the first person template to create a Metroid fangame with a Prime-esque setup, and I'm having problems creating the morph ball. I have the blueprint for the morph ball coded and I'm using a player controller blueprint to make the switch between the two. When I press the key to morph, it spawns the morph ball actor but does not destroy the Samus actor, camera does not track the ball and is also restricted to horizontal rotation. Switching after this always locks up the camera completely. This is my player controller BP. alt text

Am I missing something required to tell the game it's switching to third person? I was certain just switching the actor was enough and the camera used by the actor was what determined perspective.

Product Version: UE 4.11
Tags:
more ▼

asked Apr 21 '16 at 11:24 PM in Blueprint Scripting

avatar image

Kalamadea
1 1 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi!, first I'll tell you how you could make it work with your current setup and then I will give you suggestions that may be useful. Keep in mind I'm updating the engine right know so I cant test your setup or my solution but I hope it can help you.


Solution (I hope): So lets get to it. in the blueprint above you are destroying the player controller instead of the actor the player controller is controlling. And given that the player controller is destroyed the transform it passes doesn't exist. From the player controller you should get the controlled pawn and hook it to the destroy actor node.


Suggestions:

  • Instead of the multigate you could use a flip flop node (it will look nicer ^^)

  • Instead of destroying and creating every time the actors, you could try to make the morph ball part of the samus character blueprint. This way you wont have to pass variables like the health between the actors. (Although I think you are using the player controller to hold variables like score, etc)

Hope you find this useful

Ram

Programmer at Unforgiven

more ▼

answered Apr 22 '16 at 12:07 AM

avatar image

Ramboozled
51 3 3

avatar image Kalamadea Apr 22 '16 at 10:26 PM

I am planning to store the variables in the player controller and manipulate them there, yeah. Having them as multiple characters has made it easier to code them completely I've found and keep the tools of the morph ball and of Samus separate from each other, and the collisions have been easier to do with them separate.

I have found out that the camera problem did not stem from this blueprint, though. I've got the controls fixed with your answer now but even with the "get controlled pawn" node linked to the destroy node it's not destroying the actor. alt text

avatar image Kalamadea Apr 22 '16 at 11:24 PM

Never mind, I managed to fix it. I swapped the order of the unpossess and destroy nodes and it's working fine now. Thanks for the help with the other half of the problem, though!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question