• 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 Henry Zieke jr · Mar 17, 2010 at 03:22 PM · iphone

Firing weapon while moving

I have a weapon that fires while stationary in iPhone. When I move my character I can no longer fire the weapon. When I am stationary again I can now fire the weapon again. Only when I move can I not fire the weapon. I am using the Penelope controlls provided with iPhone. I have no issue with moving the player around, just firing while moving. Please help me.

Comment
Add comment · Show 1
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 MedianHansen · Mar 18, 2010 at 12:20 PM 0
Share

Please, add some of the code, otherwise it'll be hard to find the error

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Henry Zieke jr · Mar 18, 2010 at 06:02 PM

Eric5h5

I will send in the code when I get home tonight as I am at work. And thank you for the response.

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 Lipis · Mar 19, 2010 at 12:59 PM 0
Share

use comments... :)

avatar image
0

Answer by Henry Zieke jr · Mar 19, 2010 at 01:55 AM

for (var evt : iPhoneTouch in iPhoneInput.touches){

if (evt.phase == iPhoneTouchPhase.Ended){

     if (justLoaded) {
         startCannonWaitTime();
         justLoaded=false;

 } else {

     FireProjectile();   

 }

}

}

The above code will fire the cannon whenever you tap on the screen, move either rotate or forward/backward buttons. Now though when you place your fingers on either buttons the cannon will go off as well. So I have solved 1/2 my issue. Now how do I fix it so that the cannon will not fire when I first touch the buttons, it now works while I move them, but firing when first touching them is not good. Thank you for your patience wit me.

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 Lipis · Mar 19, 2010 at 01:00 PM 0
Share

this is not exactly the answer to your question.. it's not a forum like site..! please go through http://answers.unity3d.com/faq for more details..

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Making a GetComponent array 1 Answer

Locomotion System & Unity iPhone 1 Answer

Can Unity 3 build for the iOS Simulator? 2 Answers

WHAT licence for Iphone DEV 2 Answers

In priview good work, but on Iphone - incorect 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