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"

Disabling hovering on a hover vehicle

Greeting all! We are three people working on a game project for school, and our game is about racing in hover pods. We have followed this tutorial: https://www.youtube.com/watch?v=cPVaDndT7tY and made a car that hovers/balances nicely when it is on the ground(which in this case would mean that the trace lines hit the ground).

The problem is the higher the speed gets, the higher the pod gets above ground, and the lines stop tracing. At this point it just floats. Not sure if it is the way we make it move forward (Add Force to InputAxis MoveForward) that does this, or the fact that it has hover components. The only change we made in the tutorial blueprints is that we cut the Hover Force when the lines are not tracing anymore, not that it helps anything. This is what happens to our car: https://youtu.be/SuDenGxtGZ4

We need to make it "fall" straight back down on the track/ground somehow. Probably not a difficult task, but we have not succeded as of yet.

This is more or less what we're trying to make: https://www.youtube.com/watch?v=Bbxnab8hlp0

Hope there is someone out there that knows how to fix this, would be greatly appreciated!

Product Version: UE 4.10
more ▼

asked Mar 07 '16 at 12:37 PM in Blueprint Scripting

avatar image

Renata Royzman
1 1 2 2

avatar image Erasio Mar 07 '16 at 03:11 PM

The only change we made in the tutorial blueprints is that we cut the Hover Force when the lines are not tracing anymore

That should not be necessary because in the tutorial he is already lerping between 0 and the "Hover Force" variable. This means when alpha is 1 (aka trace doesn't hit anything) a force of 0 will be applied which doesn't have any effect.

And in regards to your issue I just have one question.

Why is it falling this slowly? This is what you have to ask yourselves as this will solve your problem (at least I'm quite certain it will).

If Physics are enabled it should drop with increasing speed to the ground and only do anything at all once a trace hits again. This slow downwards gliding with no input at all seems incredibly weird.

Lastly I would like to add a small tweak to this system as I would personally do it.

As long as the trace hits something move forward by the impact normal or maybe the forward vector. As soon as you lose the trace though add a small tilt to the front of the vehicle (either by moving the center of mass forward or by manually slowly applying a small rotation so that the front of the vehicle turns downwards) and only apply the force to the forward vector if it's facing downwards. Otherwise just make it go straight forward.

This will make sure that pressing forward will not help the vehicle to fly by adding a force upwards when it just drove over a ramp but rather help it come down quicker while always moving "forwards" rather than in the direction the vehicle is facing.

...also usually you use smaller shapes as your hover car because this can result in the car being stuck (or at least losing speed and behaving slightly weirdly) when both traces don't hit anything but the middle of the car is sitting on the track when there is an arc.

avatar image Renata Royzman Mar 08 '16 at 09:43 AM

Thank you so much for the answer!! I think I understand the physics better now.

Yes, I figured turning off the Hover Force probably wouldn't change anything, but we were pretty much grasping at straws. I will try and see if I can tweak the center of mass, right now it is under the car in the middle, because according to this video: https://www.youtube.com/watch?v=LG1CtlFRmpU it should keep the car more stable. This is all very new to us, so even if we do understand the theory, it's not that easy to actually figure out how to do it in the blueprint.

Yesterday we tried the "push car really hard down" approach, and it does the job holding the car from flying up, and making it fall down more predictably off the track. Today I tried switching out the mesh we had with a simple squashed cube, so it's not our mesh that is making it float. The Simulate Physics check box is checked, tried with different weights in kg as well, the result was that it was really hard to make it move forward, while it still floated like a feather off the track. It is as you say, a strange thing that it doesn't just tumble down to the ground when it's not tracing, with the physics simulating and all.

Here's a video of how it looks with -10000000.0 force added in Z axis for every tick when it doesn't trace: https://www.youtube.com/watch?v=H7JYd1LEeWE&feature=youtu.be. I added a single trace line on the mesh itself for testing purposes. Here, every time Print string says "No trace" the force is added. Looks like something is happening, but still obviously doesn't look right. I feel like I'm missing some really obvious gravity issue, but I'm at a loss.

avatar image Renata Royzman Mar 08 '16 at 10:04 AM

Tried simply disabling the hover force on all four components, at this point the gravity seems to kick in correctly...

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

0 answers: sort voted first
Be the first one to answer this question
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