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
0
Question by Spittin_fire · Jun 25, 2011 at 01:52 PM · collisionrigidbodyimportmodel

Colliding with mesh works on top, but not sides

Hello I have created a temple like structure made with multiple cubes and cones in a 3d program, then I saved it as .3ds. Through trial and practice, I have also made a cube directly in Unity3d, and added a rigidbody, and the collider is already on it. I collide with the cube fine, however my temple, also having a rigid body and all the different polygon structures having colliders (I have tried cube and mesh) it allows me to walk directly on the surface however when I am on the ground and press my character against the side of the wall, I go through it. My question is how is it I can walk ontop of it, but still go through the sides as though no collision is beeing realized by the program.

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 Joshua · Jun 25, 2011 at 02:26 PM

Without code I can only guess to what the reason is, but here goes.

For 'standing' on something you use the physics engine, which applies a constant downward gravitational force. If the physics engine detects collision, it won't let you fall though.

for 'walking' however you don't use the physics engine, you directly set the transform. Meaning you basically teleport the cube a tiny bit forward/backward each step, without checking if something is in it's way.

As quoted from this page: "Generally, you shouldn't manipulate the Rigidbody and the Transform of the same GameObject - only one or the other." Your best solution here would be to move the cube through the physics engine, by adding a small forward/backward force.

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

Answer by Spittin_fire · Jun 25, 2011 at 03:53 PM

Thank you sir Joshua for your time, What is going on, there is no cube that moves, and I have written no script for these events. The only thing that moves is my character, by code of input, I have a test cube to see if I can collide against it correctly, and I do, I cannot go through its sides or from the top, the structure made of many cubes is my problem. I go through the side of its walls though stand on top of it withought going through it. I have indeed read the page you linked me to many times to see if there is some key element missing, but I am blind to what it is. What you say, move the cube with the physics engine, is there a way I can make my character move against the wall instead of through it with the force element? If coding is the key, I code in csharp, but like I said the only code I have used so far is to make my character move... thanks again!

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 Spittin_fire · Jun 25, 2011 at 05:50 PM 0
Share

While messing around I uploaded another model, gave it a mesh collider, and well... its doing the exact same thing. I can go through the sides, but stand on top of it without fallin through..

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Problem with Object collision 1 Answer

Mesh Filter Cosmetic Damage 1 Answer

Character Controller goes through objects 2 Answers

Rigidbody not colliding with walls 1 Answer

How to create a 3D object (terrain) using imported data (CSV, txt)?! 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