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 BenjFra · Apr 21, 2014 at 09:15 AM · rigidbodyinput

RigibBody and ignored Input.GetKeyDown

Hello !

I'm facing a very strange problem right now. I'm having two scripts running simultaneously, one is a simple dialog that I cooked myself and one is an interaction using physics.

What I'm trying to do is display a dialog and simultaneously launch a sphere with a rigidbody. Both actions works with the same key (Fire1). The two scripts are completely independant but both check if fire1 has been pressed down during the frame (in the update function), and if so, one script launch the ball and the other display the next sentence in my dialog.

The rigidbody is not on the sphere and is added at runtime in the script for the sphere. However, when I press fire1, only the sphere script gets it and not not the dialog one. After a lot of test, I realised that it was the rigidbody that was responsible : if I don't add it, both scripts get the input, but once I add the rigidbody to the ball, it's like the input gets eaten and not taken into account in the dialog script.

Am I missing something really simple ?

Comment
Add comment · Show 4
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 maddFrogg · Apr 21, 2014 at 10:22 AM 0
Share

It looks like you are getting some error and the script playing is stopped before the Fire1 input gets to the other script.

avatar image Ed unity · Apr 22, 2014 at 09:12 PM 0
Share

Rigidbody should not be preventing input to a script on an object that is completely unrelated. Please file a bug report if you have a reproducible project.

avatar image ToxxicSin · Apr 23, 2014 at 02:55 AM 0
Share

$$anonymous$$ake sure you have the dialog script attached to something also. It doesn't make any sense why the rigidbody would cause that. $$anonymous$$ake sure to check that there is nothing else going on. Try making a new scene and testing just the dialog and sphere alone

avatar image BenjFra · Apr 23, 2014 at 03:03 PM 0
Share

$$anonymous$$y scene is indeed quite complicated and specific to my situation. I will try to reproduce the bug in a simple scene and, if needed, submit a bug report. I'll do that as soon as possible, I don't really have the time right now, I'm a student and a lot of work these days... Thanks for the help anyway !

0 Replies

· Add your reply
  • Sort: 

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

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

Related Questions

Odd input glitch 2 Answers

3D world 2D gameplay, keep player in the camera? 1 Answer

Falling object touch 0 Answers

rigidbody.isKinematic = false Does NOT Work 2 Answers

Player object falling slowly when holding input 2 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