• 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 /
This question was closed Oct 22, 2012 at 01:11 PM by Fattie for the following reason:

The question is answered, right answer was accepted

This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by scarfey91 · Oct 22, 2012 at 12:07 PM · movementdirectionbullet

bullet problems

hi im creating a game for my university course and ive run into a small problem ive got this code for a bullet but for some reason its not doing anything. ive set the speed to 10 and when i press play it should move forward but it doesnt can someone take a look for me
var bulletSpeed: int;

 function update(){
 
        amtToMove = bulletSpeed * Time.deltaTime;  
        Transform.translate(Vector3.forward * amtToMove);
        
 }
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 Fattie · Oct 22, 2012 at 12:09 PM 0
Share

huh, you are animating the bullet ?

do you know about rigidbody and using the physics engine?

unityGems.com

$$anonymous$$gest you add "Debug.Log" statements to quickly find your problem. Did you forgot to attach the script, etc ?

avatar image scarfey91 · Oct 22, 2012 at 01:07 PM 0
Share

haha feeling pritty stupid now :D thank you

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by robhuhn · Oct 22, 2012 at 12:19 PM

I think there are just upper- / lower case issues. I'm not used to JS but it should be

 function Update() 
 {
     amtToMove = bulletSpeed * Time.deltaTime;  
     transform.Translate(Vector3.forward * amtToMove);
 }
Comment
Add comment · 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

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

11 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

Related Questions

C# - 2d --I have two questions... both seem like they should be incredibly simple - script hive mind + MoveTo not follow 1 Answer

4 way direction movement using a Character Controller. 1 Answer

Character rotating to previous rotation 1 Answer

How do I keep my character facing the direction of travel after movement stops? 1 Answer

Tracking HTC Vive Controller Motion Direction? 1 Answer


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