Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Nathan Bennett · Apr 24, 2011 at 03:26 PM · gravityforcehoverwipeout

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Justin Warner · Apr 24, 2011 at 04:08 PM

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Joshua · Apr 24, 2011 at 04:11 PM 0
Share

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 :)

avatar image Justin Warner · Apr 24, 2011 at 04:36 PM 0
Share

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 =).

avatar image Nathan Bennett · Apr 24, 2011 at 04:53 PM 0
Share

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

avatar image Justin Warner · Apr 24, 2011 at 05:23 PM 0
Share

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

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

No one has followed this question yet.

Related Questions

How to make a rigidbody hover giving it an upward force? Mine still doesn't stay even when the upward force and graviational pull are equal. 3 Answers

Firing projectile in curve 1 Answer

Rotational Gravity - Camera and Force problems 1 Answer

Sci Fi Racing Controls and Physics? 0 Answers

Gravity trouble: Falling slow, jumping fast 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges