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 The-BOOM · Feb 06, 2013 at 10:30 PM · physicsvelocityhover

Naturally make velocity 0

I have an object falling at velocity V with mass M. I want to know the force needed to make it's net velocity in the Y direction 0. I know I can just make the velocity 0, but that would be unnatural, and wouldn't allow the object to hit the ground of it does not react fast enough.

I want this information so I can make a hovercraft that constantly stays around a meter off the ground. All the equations I've looked up either need a dt or a dx, and I want this to be instantaneous.

And if this just doesn't work, how else would I keep a hovercraft from touching the ground through a physics simulation?

Comment
Add comment · Show 2
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 Wolfram · Feb 06, 2013 at 11:23 PM 1
Share

There is no way to make it instantaneously 0 in a "natural" way, that would require an infinite upwards force.

However, you already have the concept of dt - it is the frame time between two FixedUpdate(). So if you apply a force for only one physics frame, you effectively applied an impulse of force*Time.fixedDeltaTime.

avatar image Fattie · Feb 07, 2013 at 08:53 AM 0
Share

exactly as Woflram says, you need a spring for this sort of thing. that's the usual approach in video games for hovercraft, star wars -style speeders, etc.

the physics question you're asking is irrelevant

the answer is very simply that you use the ConstantForce system and simply make the ConstantForce the same as gravity.

this is indeed precisely how a hovercraft (or "a human standing on a floor") works, by applying an equal and opposite force

that part is trivial

however, when you simulate something like a hovercraft, it's all about simulating the small "bounce around" effects caused by small random movements of the air

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by barinelg · Feb 06, 2013 at 10:58 PM

From the sounds of the hovercraft, you're making it perpetually fall, which means that you need some amount of upward force to hold it in place. To me, to keep it 100% stationary vertically you'd need an upward velocity that is equal to the downward velocity. Basically you would take the calculated (or set) downward velocity, and then have that velocity applied upwards to it. For a more hover up-and-down effect, you could decrease and then increase the force by a small amount at set intervals.

The only other way I can think of is an upward force acting on a very heavy object just enough that it can just barely get off the ground, but never enough to keep it up in the air.

Maybe some variation of the above? I'm no physics major, and I'm not 100% familiar with the engine's physics systems, but to me the above makes sense. :)

Comment
Add comment · Show 3 · 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 The-BOOM · Feb 06, 2013 at 11:07 PM 0
Share

Well you can't act a velocity on something, the only way to make something move is either to use a force or a torque (an angular force). I do have it giving more force as the vehicle gets closer to the ground, but it either settles down on the ground with not enough force, or continuously bounces higher and higher.

avatar image Fattie · Feb 07, 2013 at 08:54 AM 0
Share

bar, it has nothing to do with velocity. you simply set the constant upwards FORCE the same as gravity, which is a constant downwards force

"I'm no physics major" why answer the question man? :)

avatar image Wolfram · Feb 07, 2013 at 11:34 AM 0
Share

@Fattie: $$anonymous$$erely canceling out gravity will not comensate any velocity the object already has, it will just stop it from accelerating any further.

avatar image
0

Answer by Wolfram · Feb 06, 2013 at 11:29 PM

Haven't tried it, and my physics classes haven been over way too long by now...but in theory it should be something like this to make the object stop within one frame:

Apply a force of -gravity (to compensate gravity) + mass*(-velocity)/Time.fixedDeltaTime.

Comment
Add comment · Show 1 · 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 Wolfram · Feb 06, 2013 at 11:31 PM 0
Share

An entirely different approach to simulate a hovercraft would probably a spring-like approach, mayeb even with a SpringJoint or something.

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

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

SImply yet tricky question about RELATIVE VELOCITIES... 1 Answer

Unity3D: Get Velocity after collision 0 Answers

Accelerate a rigidbody towards max speed 2 Answers

slowing sideways velocity 2 Answers

Rigidbody character controller can't walk on stairs 0 Answers


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