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 /
avatar image
2
Question by ddule · Apr 17, 2018 at 04:15 PM · collisionphysicsgridforcerigibody

Bad grid rigibody3D collision

i have map of solid block(in 3D with x and z) and every block have box 3d collision and I have the vehicle with Rigibody3D but while I am adding force to the vehicle it get rotating by these solid blocks but that surface should be flat(smooth) and so a ride any solutions for this

Comment
Add comment · Show 11
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 ddule · Apr 18, 2018 at 02:50 PM 1
Share

alt text

uny.png (63.5 kB)
avatar image WinterboltGames · Apr 18, 2018 at 02:52 PM 0
Share

Why not make a single big cube with a single box collider?

avatar image ddule WinterboltGames · Apr 18, 2018 at 02:59 PM 0
Share

sometimes in that grid is gap(no block you can fall in that) like [b][b][b][b] [b[e][e][b] [b][b][b][b] b-block e-empty

avatar image ddule · Apr 18, 2018 at 03:36 PM 1
Share

alt text

ezgifcom-video-to-gif.gif (445.5 kB)
avatar image TreyH · Apr 18, 2018 at 03:49 PM 1
Share

How are you moving your vehicle? Can i go ahead and guess that you're doing it in Update()?

avatar image ddule TreyH · Apr 18, 2018 at 04:07 PM 0
Share
     void FixedUpdate () {
                if (move|| Input.Get$$anonymous$$ey($$anonymous$$eyCode.UpArrow)|| Input.Get$$anonymous$$ey($$anonymous$$eyCode.DownArrow))
         {
             if (Input.Get$$anonymous$$ey($$anonymous$$eyCode.UpArrow)) forward$$anonymous$$ove = true;
             else if (Input.Get$$anonymous$$ey($$anonymous$$eyCode.DownArrow)) forward$$anonymous$$ove = false;
                 $$anonymous$$oveTank();
         }
 
     }
 
    void $$anonymous$$oveTank()
     {
         if(moveCounter>0)
         {
             if(forward$$anonymous$$ove)
             {
                 this.GetComponent<Rigidbody>().AddForce(transform.forward * forwardSpeed * 60f * GetForwardSlide() * Time.fixedDeltaTime, Force$$anonymous$$ode.Force);
                 this.GetComponent<Rigidbody>().AddTorque(transform.up * rotationSpeed * 60f * GetTorqueSlide() * Time.fixedDeltaTime, Force$$anonymous$$ode.Force);
             }
             else
             {
                 this.GetComponent<Rigidbody>().AddForce(-transform.forward * forwardSpeed * 60f * GetForwardSlide() * Time.fixedDeltaTime, Force$$anonymous$$ode.Force);
                 this.GetComponent<Rigidbody>().AddTorque(transform.up * rotationSpeed * 60f * GetTorqueSlide() * Time.fixedDeltaTime, Force$$anonymous$$ode.Force);
             }
            
         
         }
     }
 
 
avatar image TreyH ddule · Apr 18, 2018 at 04:15 PM 1
Share

What do the colliders look like your for your tank?

Show more comments
avatar image ddule · Apr 19, 2018 at 03:13 PM 0
Share

Should I use mesh collider ins$$anonymous$$d(it's static)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Geejayz · Apr 18, 2018 at 03:14 PM

On you vehicle, in the Rigidbody component in the inspector there is an option to freeze rotation. (I don't have Unity open in front of me at present). That should stop the vehicle rotating but could still introduce bouncing depending on your particular situation.

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 ddule · Apr 18, 2018 at 03:20 PM 0
Share

But vehicle must rotate otherwise that is reason why my vehicle have rigibody and not basic position manipulation,but even without x and z rotation i can see error

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

167 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 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 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 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

How to get Satisfying Collision Physics 1 Answer

Realistic kinettic force? 0 Answers

Manually Apply Cars Collision Response Force 0 Answers

Same Collision Rebound Force on Cars 0 Answers

Destructible objects by a projectile 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