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 DougWiiBoy · Jul 13, 2010 at 10:03 PM · rigidbodyflyinghovering

Broomstick Flying with Rigidbody?

I have been searching all over for a decent tutorial or script to modify and haven't had any luck. I am looking to achieve a semi-realistic rigidbody controller that can fly left/right, forward, and hover. I am still a beginner, some basic knowledge of Actionscript (like javascript) but the advanced 3d equations puzzle me. Please don't suggest a Google search, I have been trying for an hour.

Thanks :)

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 MikezNesh · Jul 13, 2010 at 11:00 PM 0
Share

Should the guy always be hovering or you need to hit a button to hover?

avatar image DougWiiBoy · Jul 13, 2010 at 11:33 PM 0
Share

you should have to hit a button for the character to fly but it would be nice for him to maintain distance from the ground so he doesn't touch it

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by MikezNesh · Jul 13, 2010 at 11:07 PM

For hovering just add a bobbing up and down on a broom animation and set the y axis to whatever value you want. Depending on how far up you want him. Or you could add relative force if you want the guy to be able to push off other objects if there are hills or stuff.

For moving controls follow a tutorial like this one:

[http://www.youtube.com/watch?v=gUZOZP-sgng&feature=related][1]

or

[http://unity3d.com/support/resources/tutorials/car-tutorial][2]

EDIT:

to move with rigidbody you can do on Input.GetKey() blah and set speed to an axis.

EDIT #2:

to set up speed for rigidbody use this code:

if (Input.GetButtonDown ("blah")) {
    rigidbody.velocity.y = 10;
}

note: the .y changes depending on what axis you want to move on.

Comment
Add comment · Show 6 · 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 DougWiiBoy · Jul 13, 2010 at 11:49 PM 0
Share

i need to use a rigidbody for the controller since then i would get somewhat more realistic flying physics and the character controller collider is a real pain with my model.

avatar image MikezNesh · Jul 14, 2010 at 12:25 AM 0
Share

Ok. edited to answer.

avatar image DougWiiBoy · Jul 14, 2010 at 12:55 AM 0
Share

How exactly would I set speed 0.o I have some code but of course my pure uselessness kept me from completing or fixing it :( sorry for being such a noob

avatar image MikezNesh · Jul 14, 2010 at 01:00 AM 0
Share

It's ok. Will edit post to answer in 20 $$anonymous$$utes. (Sorta busy AT$$anonymous$$)

avatar image DougWiiBoy · Jul 14, 2010 at 01:14 AM 0
Share

Thank you for helping :)

Show more comments

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

1 Person is following this question.

avatar image

Related Questions

Rigidbodies flying up in the air on collision 4 Answers

Player bouncing off issue 1 Answer

Trees are flying when rigidbody is activated 1 Answer

Rocket-styled angular drag 0 Answers

Fly Mode 2D + Rigid Body vs CharacterController problems 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