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"

Enable/Disable Input Wheeled Vehicle / Pawn does not work, but works on Actor

Hey Fokls,

last 2 days i worked on Player switch Pawns via. Input. With a bit help of eXi. After a frustrating evening i figured out, that the same blueprints nodes, doesn't work on "Wheeled Vehicle" Class, but works fine on "Pawn" Class.

Is there something i miss or is it a bug? Last thing (eXi's Tipp) it could be, that you need to deactivate the input of the player first, using wheeled vehicle. Would nice, if someone could help to answer this.

In the Screenshot bellow you can compare both Actors BP. I hope i didn't forget something. But i tested it twice. It just works, if you create the Class as "Actor" instantly.

Consume Input is also active on both.

greetz Spähling

alt text

Product Version: UE 4.10
Tags:
bug.jpg (1.6 MB)
more ▼

asked Feb 20 '16 at 04:48 PM in Blueprint Scripting

avatar image

Spaehling
166 7 15 24

avatar image Sean L ♦♦ STAFF Feb 23 '16 at 09:30 PM

Hello,

I have performed a test regarding your issue, and using a class based on Wheeled Vehicle, I was still able to successfully disable input, however, I did go in and deactivate the input of the original character first. Have you tried this?

avatar image Spaehling Feb 24 '16 at 02:52 PM

That is a good question. Right now iam totally uncertain. You should keep in mind iam a 3D Guy, so i really easy mess things up with Blueprints ;).

Well about the problem.

I started with the 3d side scroller template. I didn't used a custom player controller class. Maybe this is the point, where the problem starts. Cause if i disable the input for the char, i can't do anything, also pressing the Input Key for switching the pawns.

well, this isn't a bug, if you say and it's a problem i produced myself, cause of unknowledge. Iam pretty sure about this. ^^ Anyway, any ideas where i could start to search?

Btw. the Possesing works, if i call the event via. Overlapp the Trigger Volume of my Pawn.

avatar image Sean L ♦♦ STAFF Feb 24 '16 at 03:37 PM

Have you tried setting up an event to possess your vehicle where it was something along the lines of: Key Press->Possess->Disable Input. However, what you'd need to do in this situation is create 2 player controllers. One for your Actor, and one for your Wheeled Vehicle. Then, when you possess the vehicle, ensure that you are using the Wheeled Vehicle controller to possess it and then disable input on the Actor Player Controller. You could attempt a setup such as this and see if that gets you the results you are looking for.

avatar image Spaehling Feb 24 '16 at 11:13 PM

Yeah i also tried to use a Custom Event. That worked, when i call a (lets say) "Enter Vehicle Event" in my character blueprint. But exi told me, that is not what i want to have. Cause i wanna call the Enter and Exit vehicle, inside the vehicle. Not "Enter" in the Char and "Exit" inside the Vehicle.

I also tried to follow, what you say last. but got confused again. Going to make a graphic, what i understand what you said and what i think how it should work. maybe you can see then, where my lag is. hope that helps -.-

avatar image Sean L ♦♦ STAFF Feb 25 '16 at 09:40 PM

I'm having a bit of trouble following exactly what point you are at in your current project. I think the easiest thing would be for you to zip up your project, upload it to Dropbox, and provide me with a link so I can download and take a look at what you have so far. You can PM me the link through the forums: https://forums.unrealengine.com/member.php?160394-Sean-Flint

avatar image Spaehling Feb 28 '16 at 01:45 PM

PN is sended. i also got some problems to follow you. so it with the files its maybe the best. hope you find, what iam doing wrong.

avatar image Sean L ♦♦ STAFF Mar 01 '16 at 08:04 PM

I noticed that the build you sent me did not contain your .uproject file. Could you please provide another zipped up build that has the .uproject? Thank you.

avatar image Spaehling Mar 01 '16 at 09:36 PM

Inside the PN it didnt worked with picture. anyway, here it is again. not sure what you mean. i my .rar the uproject is there. or do you mean something else?

alt text

winrarfile.jpg (284.8 kB)
avatar image Sean L ♦♦ STAFF Mar 02 '16 at 01:34 PM

I've got it now, thank you. I will look into this as soon as I can and respond with any new information as soon as I have it.

avatar image Sean L ♦♦ STAFF Mar 07 '16 at 04:28 PM

Hello,

Could you please post the images that you provided me in the PM as an answer to this post? It would be valuable to share your workaround with the community.

avatar image Spaehling Mar 07 '16 at 04:50 PM

yeah for sure. Going to clean it up first, also talk to exi again. but yeah, i'll gonna defintily do.

also wanted to wait for your answer. what you say, about the workaround.

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

2 answers: sort voted first

Hello,

I am marking this topic resolved for the time being. When you have cleaned up the workaround blueprints and ensured that they indeed work for this setup, please post them in an answer and I will come back and accept it.

Have a great day

more ▼

answered Mar 07 '16 at 04:53 PM

avatar image

Sean L ♦♦ STAFF
43.6k 485 152 442

avatar image eXi Mar 07 '16 at 05:08 PM

Hey Sean,

the main problem here is, that APawn overrides the "EnableInput" funtion with this:

 void APawn::EnableInput(class APlayerController* PlayerController)
 {
     if (PlayerController == Controller || PlayerController == NULL)
     {
         bInputEnabled = true;
     }
     else
     {
         UE_LOG(LogPawn, Error, TEXT("EnableInput can only be specified on a Pawn for its Controller"));
     }
 }

This leads to "EnableInput" failing on a Pawn that is not controlled by the passed Controller. So if one calls "EnableInput" with the PlayerController0, that already possess the current pawn, it would fail with the Error message in the "else" above.

The code makes you think that leaving the PlayerController empty would result in bInputEnabled = true, but even with this, the Pawn is not getting Input enabled.

The workaround Speahling has is made by me. He will post the screenshots, which i gave him, later. It's using the PlayerController as a central position that manages switching. While this is a valid and solid workaround, it does feel weird that the Pawn implementation of "EnableInput" removes the ability to enable Input on a Pawn that you don't have possessed.

I mean, you can enable Input on an Actor, why not on a second pawn?

If you need more information, just tell me.

Cheers, eXi

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

Allright, i created a new small project with the workaround inside. For everyone who has problems, can take a look (UE 4.10.4). Hope that helps everything.

A HUGE THANK YOU, to both of you. The Solution is made by eXi, so all fame belongs to him :)

Project Files: https://www.dropbox.com/s/f9zxngwbw85wd6q/PawnEnter.rar?dl=0

Screenshot Files: https://www.dropbox.com/s/5qyrlqstwxc20om/Workaround_Pictures.rar?dl=0

alt text

alt text

alt text

alt text

alt text

more ▼

answered Mar 07 '16 at 07:23 PM

avatar image

Spaehling
166 7 15 24

(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