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 studentvz · Mar 28, 2015 at 04:46 PM · unity 5object movement

Unity 5 - Can't move/control object

Hello,

If I open a project from Unity 4.6 in Unity 5 I can't control my object anymore. I also created new project in Unity 5, set a scene with some ground and object (cube) that I want to move with my keyboard keys. I attach script to object and start the scene but object is not moving. Same thing is working in Unity 4.6.

Script is very simple:

 using UnityEngine;
 using System.Collections;
         
         public class Move : MonoBehaviour {
         
             public int speed = 0;
             private Vector3 input;
      
             void FixedUpdate(){
                 Vector3 input = new Vector3(Input.GetAxis ("Horizontal"), 0, Input.GetAxis("Vertical"));
                 GetComponent<Rigidbody>().AddForce(input * speed * Time.deltaTime);
             }
         }

I'm not using any kind of animations in my project.

EDIT

I opened my Unity 4.6 and project that I'm working on (project was not opened with Unity 5), and now even there I can't move my object. Maybe some conflict betwen Unity 4.6 and Unity 5?

EDIT2

I unistalled Unity 5 and now I can't make object to move even in Unity 4.6. Like it is glued to ground, I can see some force added to object (it shakes a little on top).

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 barjed · Mar 29, 2015 at 07:44 PM 0
Share

If it's shaking then the script is working. Did you try increasing the speed or decreasing the mass of the rigidbody?

1 Reply

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

Answer by studentvz · Mar 30, 2015 at 06:21 AM

SOLVED For some reason my timescale was set to 0 (not in code), after setting it to 1 in Start function everything is ok.

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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Click object to move player/object 1 Answer

Change colour from random to constant? 1 Answer

How can I fix the Unity Remote 5 blurry problem? 2 Answers

UI covering my Sprite 9 Answers

Text Mesh Pro - Underlay problem 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