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
1
Question by RapsFan · Aug 01, 2011 at 11:44 PM · physicsdragcube

Building blocks

Hello everyone. I doubt this can be done easily but hopefully someone can nudge me in the right direction. I have some rigid body's representing building blocks that can be dragged around to build things but the problem is as of now it's kind of difficult because there's no way to raise/lower the blocks so they ca't easily be stacked. Also the RigidBodyDrag is kind of slow and inaccurate. Does anyone have some suggestions on ways to achieve the simulation I'm looking for?

Edit What I decided I want to do is drag with the mouse, and raise/lower the objects with the up/down cursor keys.

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

2 Replies

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

Answer by Adamcbrz · Aug 05, 2011 at 03:54 AM

RapsFan,

This is a very crude prototype. There is a lot of things that could be improved/fixed. But I hope it gives you a starting point for your project.

http://dl.dropbox.com/u/22440911/Stacking.zip

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 RapsFan · Aug 05, 2011 at 02:53 PM 0
Share

Thank you very much Adam! Can't wait to start testing :D

avatar image
0

Answer by Adamcbrz · Aug 02, 2011 at 10:06 PM

One option is to drag with the mouse like you mentioned and use code to determine when to change levels. So if a block is at level 1 and you collide with it then move to level 2 and so on. I am assuming that you are stacking directly on top in some sort of grid layout. So blocks stack directly on top of other blocks. Let me know if that doesn't make sense.

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 RapsFan · Aug 02, 2011 at 10:18 PM 0
Share

Thanks for your reply Adamcbrz. I'm not using a grid. Basically the player had a collection of blocks that that can move around to build a toy soldier base. I wanted to make it as free as possible to that the objects aren't confined to a grid but can be arranged in any way.

avatar image RapsFan · Aug 03, 2011 at 09:05 PM 0
Share

What's the best way to create a grid? A plane for each grid space?

avatar image Adamcbrz · Aug 03, 2011 at 09:12 PM 0
Share

That is a way but it seems more flexible and efficient to do it using code. I will try and through an example up in the next few days.

avatar image RapsFan · Aug 03, 2011 at 09:20 PM 0
Share

Thanks Adamcbrz :)

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Make a rolling ball always on ground without falling when reaching the edges of the map 1 Answer

Freezing movement on Z axis. 1 Answer

simple thing I can't get right (see picture) 0 Answers

Motion working not properly in simple pendulum 1 Answer

Calculating flight time with starting velocity and drag 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