Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by hitarthdoc1994 · Jan 01, 2016 at 01:18 PM · collisiongameobjectphysicsrigidbodyterrain

Car made from Different GameObjects and Empty GameObjects breaks on Collision with Terrain.

I made a Car using the following Hierarchy: alt text

I have the following Empty GameObjects(GO): Car, Tyers, Glass, Body, Lights, Head Lights and Rear Lights.

The rest are Basic 3D GameObjects.

There are three Problems: 1) If I have Only the Car GO with the RigidBody then the Car wont move using the RigidBody.AddForce().

2) If I Make Every Empty GO a RigidBody then the Car Breaks and the Empty GOs fall through the Terrain.

3) If I Make Every GO a RigidBody then also the Car Breaks and the Empty GOs fall through the Terrain.

In 2) and 3) the GOs still DON'T respond to RigidBody.AddForce().

----------

Code Used:

using UnityEngine; using System.Collections;

public class MoveObjectPlayerInputKB : MonoBehaviour {

 private Rigidbody car;

 public float speed = 0.5F;

 public float turnSpeed = 0.5F;

 // Use this for initialization
 void Start () {

     car = GetComponent<Rigidbody> ();
 
 }
 
 // Update is called once per frame
 void Update () {
 
     float turn = Input.GetAxis("Horizontal");
     float forward = Input.GetAxis("Vertical");

     car.AddForce (new Vector3(0F, 0F, forward) * Time.deltaTime * speed);

     transform.Rotate (new Vector3 (0F, turn, 0F) * Time.deltaTime * turnSpeed);

// car.AddTorque (new Vector3 (0F, turn, 0F) Time.deltaTime turnSpeed);

 }

}

----------

Thanks in advanced and I also Apologize for asking such a Question as I am New to Unity. It's ONLY been 2 weeks.!

The Result I'm getting. alt text

unity-question-4.png (255.6 kB)
unity-question.png (10.8 kB)
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 hitarthdoc1994 · Jan 01, 2016 at 01:24 PM 0
Share

@$$anonymous$$ikeNewall

Can you Help... Thanks.

avatar image hitarthdoc1994 · Jan 01, 2016 at 01:26 PM 0
Share

@crazy$$anonymous$$night

Can you Help... Thanks.

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

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

Related Questions

Ball passes through the floor on movement 1 Answer

[3d]Rigidbodies are not working as expected with animations, They are not stopping on colliding, Am I doing anything wrong? 0 Answers

2 Rigidbodies will overlap when 1 is given a velocity 0 Answers

RigidBody becomes awake without a collision 1 Answer

Colliders Don't Work no matter what 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