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"

When I unpossess vehicle. Vehicle not slows down.

I don't know what I am doing wrong, but when I unpossess vehicle in Vehicle template than it will driving straight. It stops really slow, wheels are spinnig even if it hits wall.

Probably misreading some inputs for vehicle movement, because when I release throttle and I have it possessed. It will stop in much shorter distance. Even when I try reset input's in "Unpossessed" event like that: Unpossessed event figure

For example: You can try unpossess vehicle when you gain some speed and turn. Vehicle still go ahead and turn.

Is that some my problem in workflow or it's bug?

Product Version: Not Selected
Tags:
more ▼

asked Mar 14 '15 at 11:33 PM in Using UE4

avatar image

TawreCZE
29 3 6 11

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

2 answers: sort voted first

I have proper solution, but it is C++ only:

You need to create custom vehicle component and override function UpdateDrag(), also you need to call another custom function (FullClearInput) before leaving vehicle with no controller.

 .h
 
 void FullClearInput();
 
 virtual void UpdateDrag(float DeltaTime) override;
 
 .cpp
 
 void CustomVehicleComponent::FullClearInput()
 {
     ClearInput();
     ServerUpdateState(0.f, 0.f, 0.f, 0.f, GetCurrentGear());
 }
 
 void CustomVehicleComponent::UpdateDrag(float DeltaTime)
 {
     APawn* MyOwner = UpdatedComponent ? Cast<APawn>(UpdatedComponent->GetOwner()) : nullptr;
     if (MyOwner && MyOwner->GetController())
     {
         Super::UpdateDrag(DeltaTime);
     }
 }
 

Epic, this should be available out-of-box.

more ▼

answered Feb 10 '16 at 11:18 PM

avatar image

Skylonxe
81 4 6 12

avatar image spsancti Nov 09 '16 at 02:25 PM

Really helped unlike all other solutions. Thank you!

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

Check out this thread: https://forums.unrealengine.com/showthread.php?44214-GTA-Style-Vehicle-Interaction-Project-File-Included

It has the answer to your question and it also has a multiplayer-ready sample.

more ▼

answered Mar 14 '15 at 11:45 PM

avatar image

Jacky
16.8k 671 167 677

avatar image TawreCZE Mar 15 '15 at 11:30 AM

Thanks, idea behind that is not bad. In that project with gas on the floor, it doesn't work either. But is there a solution, in making a boolean variable that can affect inputs and after that using the solution with delay, before unpossessing, solve that.

One more time, thanks Jacky for aiming me to the right direction to solve that issue.

(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