x


How to make an object hover(Against gravity)

Hello, I'm trying to make a wipeout mock up, but am finding coding it to be quite difficult. All i want to archive is a floating effect- but when i apply a force over that of gravity(9.82) the ship floats on and on forever. how can i keep the ship level above the ground?

more ▼

asked Apr 24 '11 at 03:26 PM

Nathan Bennett gravatar image

Nathan Bennett
154 31 33 35

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

1 answer: sort voted first

Have 2 scripts, if the thing goes to high go down, if goes to far down, goes up...

This'll give a hover effect, and keep the ship level... If this makes sense?

And you can do a ray from below the ship and gets to where it hits's Y value, and makes that its low, so then it hovers to that spot...

If that makes sense? Lol.

more ▼

answered Apr 24 '11 at 04:08 PM

Justin Warner gravatar image

Justin Warner
6.3k 19 27 65

But of a confusing answer xD but yeah I'd quite simply go with cast a ray downward - if you're too low add some force upwards. No two scripts stuff, just push up if you're too low :)

Apr 24 '11 at 04:11 PM Joshua

Hahaha, yea... Well, there was two ways, 1 with 2 scripts one like you said =) Lol. I can't explain what goes in my head sometimes =).

Apr 24 '11 at 04:36 PM Justin Warner

I've already tried this, just compared to wipeout it seems... Crude. Wipeout the ships drift almost peacefully over the track, while my ship...well it keeps hitting the ground! <:D

Apr 24 '11 at 04:53 PM Nathan Bennett

Look at the script SmoothFollow... They use probably the same idea, because if it wasn't smooth follow, it'd look pretty bad.

Apr 24 '11 at 05:23 PM Justin Warner
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x464
x292
x55
x3

asked: Apr 24 '11 at 03:26 PM

Seen: 1837 times

Last Updated: Apr 24 '11 at 03:44 PM