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 CrucibleLab · Apr 24, 2015 at 04:50 PM · collisionrigidbodygravitydrag

How to get movable/pushable cubes right?

In my scene, I have two cubes at the default scale of 1 x 1 x 1. One of them is a "player" cube and the other is a "movable" cube that the player can push around on the floor.

The movable cube prefab has the following attributes:

alt text

And a few notes that I observed when moving these cubes:

  • When pushed by the player the cube would start spinning, so I restricted the rotation as shown in the above image.

  • I noticed that the cube initially just shot out the direction it was pushed, so I tried increasing its mass and drag, but a high value of drag would cause the cube to NOT fall off the edge of the floor, which is not what I want. So, I assigned "0" to drag for now.

  • Another annoying thing is that sometimes the cube appears to be stuck on the floor when the player pushes it from certain directions. I don't know if indeed it has to do with the direction from which it's being pushed, but pushing the same cube yields some erratic behaviors. Odd thing is that when a NavMesh agent runs into the cube, the cube gets pushed aside quite naturally, but it is when the player pushes the cube the result is either hit or miss.

Essentially, I need the movable cube to be pushed around without getting stuck every so often. Also, I need it to react to the gravity as in real life (like falling off the edge when more than half of its body is off the floor), and when it is pushed it shouldn't move too far out - maybe just the length of its own size or a bit more would be perfect.

inspector.png (43.5 kB)
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

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

19 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

Related Questions

How to make player collide with ground? 1 Answer

How to hit gameobjects to go into the opposite direction of hit? 1 Answer

How to stop Kinematic Rigidbody from moving through walls 2 Answers

Where is the general Rigidbodies Drag? 3 Answers

Object gravity but no collisions 0 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