• 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 indiebuilder · Jun 17, 2014 at 04:40 AM · rigidbodycannon

How Do I make it harder to move rigid body?

In my game I Have a castle made out of rigid body blocks. I don't want to knock down the blocks using my musket but I want to with my cannon

So how do I Make it so rigid bodys wont move as much?

Javascript only please.

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 robertbu · Jun 17, 2014 at 04:41 AM 3
Share

One possible way is to increase the mass of the blocks in the castle, or to reduce the mass of the musket ball.

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by Neel-Frost · Jun 17, 2014 at 06:07 AM

Trying adding mass to the Rigidbody and then lower the power of your musket and then the increase the power of your cannon ball. And for physics you can use metal for the Rigidbody blocks.

Comment
Add comment · Show 4 · 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 Owen-Reynolds · Jun 17, 2014 at 12:40 PM 1
Share

There's no setting for "power." All you have are mass and speed (and you can't change the speed, since it has to look right.) Even if you fire the balls with AddForce, it just divides mass by the force and sets speed.

By "metal," I assume you mean a premade Physics material. Those are really for how much you bounce and slide on the ground, after the bullet has knocked you off the wall. But, yes, using a higher static friction will make the blocks ignore small hits.

avatar image indiebuilder · Jun 18, 2014 at 02:23 AM 0
Share

Well, I cant change the speed saying if I do my musket ball will simply go 2 feet forward and hit the ground.

And even unity says "You should strive to keep mass close to 0.1 and never more than 10. Large masses make physics simulation unstable" So what do I do can I script something?

avatar image Kiwasi · Jun 18, 2014 at 03:44 AM 0
Share

Playing with mass is the way to go. If you'd read the line above you would have noted that "Higher mass objects push lower mass objects more when colliding."

Some actual numbers to use (from google)

Cannonball mass anywhere from 2 to 20 $$anonymous$$usketball mass around 0.3

Put these numbers in and the physics should work fine.

Asking to do your own script is not going to get much luck. Writing a physics engine can be complicated and is not what you want to spend your time doing, especially when the existing engine can do the job.

avatar image Neel-Frost · Jun 21, 2014 at 03:12 AM 0
Share

@Owen Reynolds By power i meant to say the the cannon ball forward speed when it is instantiated.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Can't set position of Rigidbody precisely 0 Answers

Player with RB + capsule collider can easily penetrate ALL kinds of primitive colliders. What do I do to fix this? 2 Answers

Rigidbody falling very slow 1 Answer

Kinematic Rigidbody collision detection 1 Answer

Rigidbody jittering with camera follow 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