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"

Wheeled Vehicle Raceing Game

Hi, I wonder how to move object with continous acceleration until it reaches max speed. I would like it to accelerate while key pressed and decelerate when released. What i want to do is very simple top down car race game from scratch (using basic shapes). Should i use "add impules" ?

Product Version: UE 4.20
Tags:
more ▼

asked Aug 25 '18 at 06:05 PM in Blueprint Scripting

avatar image

Borsuk31
1 1 2 3

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Add Impulse is for physics-simulated actors. For a continuous force instead of a sudden impact or launch I would use AddForce instead. But again this only works if your actor is physics simulated.

If your actor is not physics simulated, you either need to add a Movement component to it that behaves in the way you want, or every Tick you need to do a SetActorTransform or AddToActorTransform (which would amount to you basically moving it yourself every frame).

I think for non-physics it might be easiest for you to use one of the Movement components especially if you're new to programming.

more ▼

answered Aug 25 '18 at 06:10 PM

avatar image

mightyenigma
3.4k 16 17 12

avatar image Borsuk31 Aug 25 '18 at 09:17 PM

I made this tutorial about wheeledVehicle and setup everything as in tut exept my model of car doesn;t have separate wheels. Is that the reason it doesn't work ? https://youtu.be/hqeEKWGmMQo

https://docs.unrealengine.com/en-us/Engine/Physics/Vehicles/VehicleUserGuide

(comments are locked)
10|2000 characters needed characters left

The AdvancedVehicle class that comes with Unreal relies on its PhysicsAsset to be able to Apply Torque to individual wheels, so if your car model doesnt have a physics asset set up that way then that might be why it is not working yes.

more ▼

answered Aug 25 '18 at 11:22 PM

avatar image

mightyenigma
3.4k 16 17 12

(comments are locked)
10|2000 characters needed characters left

Thanks for reply. I made it work, now i am struggeling with another things: No matter what i change in movement component i cant see the diference. I would like it to be much more dynamic with huge acceleration and accurate steering like in wireless rc cars:

https://youtu.be/OyrLRuonq6Y

more ▼

answered Aug 26 '18 at 05:12 PM

avatar image

Borsuk31
1 1 2 3

avatar image mightyenigma Dec 07 '18 at 03:12 AM

Hmm i don't know - thata the extent of my vehicle knowledge.

(comments are locked)
10|2000 characters needed characters left
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