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"

Problem with vehicles and AI

Hi, so I've been trying to create a litte vehicle/car AI that I can make better later, but the AIMoveTo's and all of those don't seem to do anything. I guess it's because of the different steering Input, so; how do I port what the AI would do over to the Throttle and Steering of a WheeledVehicle?

Product Version: UE 4.10
Tags:
more ▼

asked Jan 25 '16 at 06:44 PM in Blueprint Scripting

avatar image

blenderfreaky
1 1 3 3

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

1 answer: sort voted first

Hey blenderfreaky, are you coding in c++ or blueprints? Unfortunatly, the basic moveto etc... from the original AIController doesn't work on vehicle because it's not humanoid. The basics to get it to work, is to make your AI "think" like you, use your set input steering and throttle on your AI "brain" with some maths like DotProduct to see if your car is going on the good direction, else make it turn a little bit to face the right direction with SetSteeringInput(), make it stop when it comes to the good spot with SetHandbrakeInput() and some tests with a LineTraceSingleByChannel() on front and sides of your car so when its stuck it go back with SetThrottleInput(-1) etc...

I hope it will help you, there is this post if you want a demo from Mr. Newton, You can download and just see how he does it.

more ▼

answered Jan 26 '16 at 10:49 AM

avatar image

Mosn
1

(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