• 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
-3
Question by CupOfMayo · Jul 10, 2013 at 01:18 AM · jumpgrounded

Is there any ifNot.Grounded command?

Hey, I'm creating simple game, and i want to make my character use "jump" animation while is not grounded. I know how is.Grounded work in script, but i wonder if does like opposite of this exist? I hope you'll understand my question C: and thanks for help!

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 Kiloblargh · Jul 10, 2013 at 03:30 AM 0
Share

Sorry, but I don't think you know how anything works at this point. isGrounded isn't part of UnityEngine, it's a boolean variable from an example script.

Read the Unity scripting reference "cover to cover," and look up anything you don't understand in a C# / JS reference elsewhere. You are a long way from making your own game. (But don't let that discourage you!)

avatar image CupOfMayo · Jul 10, 2013 at 11:03 AM 0
Share

$$anonymous$$iloblargh, I just wrote is.Grounded ins$$anonymous$$d of isGrounded, that doesn't mean im that far from making my own game, because this one will be very, very simple anyway so everyone can do that :)

1 Reply

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

Answer by fafase · Jul 10, 2013 at 01:18 AM

Well the opposite of

 if(controller.isGrounded)

is

 if(!controller.isGrounded)

or am I missing something?

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 CupOfMayo · Jul 10, 2013 at 11:01 AM 0
Share

Yes yes yes yes :D Fafase, you saved my life; this is exacly what i was searching for. I wrote tittle wrong because it's if(controller.isGrounded) not is.Grounded >.<. But anyway; now my script work perfectly! Thanks again :)

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

15 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 avatar image avatar image avatar image

Related Questions

2d grounded check problem? 3 Answers

how do I script this jump animation? 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

issues with jumping and linecast2d and raycast2d 0 Answers

Is It Bad To Have Your Jump In Update()? 3 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