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 Corey Pullman · Nov 03, 2010 at 09:06 AM · rigidbodyinstantiatescale

Creating object depending on charge

I have a game I am making for a final in my game design 1 class and I am trying to figure out the best way to go about making my key mechanic. It is a one button game, and the goal is to drop a rock on one side of a see saw type of launcher, and throw the object placed on the other end forward to hit a target. I hope that makes sense... Anyways, I want it to work so that the longer you hold the button down(lets just say its the space bar) the bigger and heavier a rock you get to drop down to launch the projectile(launching it further). The targets will be moving, so the player will need to charge it depending on the distance of the target.

Should I make it so that the longer you charge, the more mass the rock has? Or maybe have several sized rocks with different amounts of gravity applied so that if you release after a certain amount of time, it will drop a specific rock? Or depending on the charge, have a script gradually increase the scale of the rock and increase the mass(or gravity)? But if there is an easier way to accomplish this please let me know. I really do not know which way would be easier. Thank you in advance.

(Sample scripts would be appreciated to help get the idea across)

Comment
Add comment
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

1 Reply

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

Answer by _Petroz · Nov 03, 2010 at 09:41 AM

It would be easier to make a bigger rock rather than many rocks. Two reasons, you can modify the mesh scale and rigid body mass to make a bigger rock, and it will also be easier to control the physics. Making many rock collide at the same time could be difficult.

Comment
Add comment · Show 3 · 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 Corey Pullman · Nov 03, 2010 at 10:10 AM 0
Share

So make a single rock, but have the scale and mass change depending on the charge?

avatar image _Petroz · Nov 05, 2010 at 05:31 AM 0
Share

Yes I think that would be the easiest way to do it.

avatar image Corey Pullman · Nov 07, 2010 at 10:02 AM 0
Share

Ok, I'll give it a try. Thanks for the input.

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

No one has followed this question yet.

Related Questions

Slowly scale object to original size on instantiate 0 Answers

OnCollisionEnter not being called, between a Rigidbody and a Box Collider 1 Answer

instantiate a Rigidbody not work for me? 2 Answers

instantiate a gameobject or rigidbody? 1 Answer

Applying force to a rigidbody 2 Answers


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