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"

How to prevent vehicle from flipping back on wheels

Hi, I've got a problem with my vehicle. My car is on its side, and it slowly rolling over on the wheels - it's ok. When raycasts which is inside wheels hits ground, it flips the car immediately on back wheels, and it looks stupid. So, how can I disable this feature or just edit it's parameters? GIF

Product Version: UE 4.20
more ▼

asked Oct 05 '18 at 01:04 PM in Installation & Setup

avatar image

1 1 3

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

1 answer: sort voted first

I would look to Borderlands 2, I not quit sure what they did to stop rolling but I have a hunch.

So One you would need to know what angle (in 2d space for example) the car is at. How you might do this, maybe ray trace, or look up ways to detect angle.
so figure out what the angle is. and if the car attempts to go over this angle you would just set the angle back to the max possible angle (you will need to play around with some values). This would give the illusion that the car is falling but not flipping, and I don't think you'll get any strange shaky movement with this idea. Then once you have the forward direction, You reapply the technique for the right direction. I've tried looking up how gearbox made the vehicles but I couldn't find much.

more ▼

answered Oct 05 '18 at 03:34 PM

avatar image

237 2 11 6

avatar image III_OrilaS_III Oct 06 '18 at 09:12 AM

It might help. But what about ray tracing in the wheels? Can i adjust properties such as the length or flip force?

avatar image GIGA-Money Oct 07 '18 at 04:42 PM

well that might seam like a more complex solution. If the wheels are attached to car body, then you really only care about car body angle. Because if your car body is within a certain constraint then that would indicate that the car has not flipped over. Then on extreme cases you would have a self flipping solution. Then if the self flipping solution fails, then that means the car ONE cannot flip back on its own, and Two you (the dev) will need to decide what should occur. So in borderlands if the car flips it attempts to flip back, but it will also kick the player out of the car if it can't flip easily, some games would just cause the car to explode but its game dependent on what you might plan.

(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