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 Rakine · Aug 24, 2012 at 10:57 PM · physicscollidersprefabstreessketchup

How do you make objects solid?

I've been trying for weeks now to figure out how to make terrain trees and objects you import from Google Sketchup solid so that you can't pass through them. I've seen other posts saying you have to use prefabs and colliders,but i don't know how to work those very well. If anyone could help it would be very much appreciated.

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 Fattie · Aug 25, 2012 at 07:09 AM 0
Share

I get the impression that very simply you don't know how to "add colliders"

Look in to colliders and learn everything about them.

Try to understand that, models from $$anonymous$$aya etc are just "to look at". Everything about "physics" happens in the game engine and you have to do it ("add colliders") in the game engine.

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by by0log1c · Aug 24, 2012 at 11:32 PM

The most common problem beginners face with collision is that they tend to move their objects through the Transform component using Translate() or the position property - these do not trigger Unity's collision detection routine.

To make it work, both objects need a Collider components (Cube, Sphere, Capsule, CharacterController, Wheel, Mesh) AND they should only move using the functions from the CharacterController or a Rigidbody and physics force.

Your question sounds like you're not sure how to use components though, you should probably take a look at the User Manual and the Reference Manual, you might need to get more familiar with the interface and unity's basic concepts.

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
1

Answer by lodendsg · Sep 02, 2012 at 04:23 PM

The method I use is as follows

To create a prefab simply right click on the folder in your project view where you would like it to live (dont worry you can move it around later) select Create >> Prefab Screen 1

This will make an empty Prefab "GameObject" and you can add various componets to it including your mesh, scripts etc. this can be done by dragging and droping or by having the object selected and clicking the "Component" menue at the top of the screen the main ones your looking for are under Physics, choose either CharacterController or Rigidbody alt text

Once you have that added to your object you should be good to go, you may want to adjust some settings such as Use Gravity, Mass, etc. depending on what your trying to get done you will also use theses to manipulate your objects in the game world i.e. in a script assoceated with the object you may call somthing similar to

 rigidbody.AddRelativeForce (forwardDirection * thrust * Time.deltaTime, ForceMode.VelocityChange);

There are a battery of tutorieals that demonstrate this in much more detail than I can here

2D tutorial (How to make a game in Unity3D) was useful for me but I am focus on 2D development at the moment.


clip2.png (72.8 kB)
clip1.png (39.0 kB)
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
1

Answer by godandantess · Nov 27, 2015 at 10:14 AM

I found a simple solution to this answer. I am a beginner and just started the basics, hope we are on the same boat. Select the object you want to make solid and click "Add Component" then go to physics>mesh collider> check convex and add a material and mesh . This should do the trick.

Comment
Add comment · Show 2 · 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 Scribe · Nov 27, 2015 at 10:21 AM 0
Share

Just a note, where possible it is best to use the primitive colliders: cube, capsule etc. As far as I am aware they are optimised and will run far smoother in general than mesh colliders. And in a similar strand of thought, avoid non-convex mesh colliders if at all possible!!!

avatar image Fattie · Nov 27, 2015 at 03:16 PM 0
Share

Hi GoDand. You don't use mesh colliders in video games. (They are only for a few very specific uses, that are not relevant to this discussion.) It's even easier than you think - you just add ordinary colliders. Box colliders work well. Very few objects in a game need more than one or two colliders - that is to say box colliders. it's just that simple.

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

11 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

Related Questions

Why is my person walking through trees? 1 Answer

How do I switch from Character player to Airship Vehicle using triggers? 0 Answers

Copy/Clone collider to other gameobject at runtime 1 Answer

Is there a way to make colliders fall asleep? 1 Answer

Inconsistent Trigger events 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