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 thedodgeruk · Aug 16, 2012 at 04:32 PM · physicscolliderterrain

collision with terrain problem?

i have a side scroller shooter game, old style . the player is a airplane , it has multiple colliders on it , to make impacts more correct .

the terrain has a collider on it . if i physics on the terrain and so it isKenetic = false and have no constraints the the airplane will detect when it hits the ground, but the ground will move because of the impact . if i do isKetentic = true OR have any constraints on the terrain then the airpllane will not detect when it hit the terrain .

please help

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

3 Replies

· Add your reply
  • Sort: 
avatar image
-2

Answer by Daryn · Aug 16, 2012 at 07:48 PM

this is for C# but I would do

 void OnCollisionExit () {
        rigidbody.isKinematic=true;
 }

This will cause it to lock in place when it goes to move. I hope this works I really dont know why your game dont work though.There is way to many problems with Unity.

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 flaviusxvii · Aug 16, 2012 at 10:12 PM 0
Share

Unity is fine. You wouldn't say "there are too many problems with pianos" just because you didn't know how to play.

avatar image Daryn · Aug 16, 2012 at 11:21 PM 0
Share

But i would say it had problems if the keys were broken or it needed to be tuned. I know what i am doing and it doesnt always work

avatar image flaviusxvii · Aug 17, 2012 at 08:48 PM 0
Share

Judging by your question and answer history I think you should reevaluate your confidence in the statement "I know what i am doing". Sure, there are bugs in Unity, but I am not sure know what you are talking about.

avatar image
0

Answer by flaviusxvii · Aug 16, 2012 at 04:46 PM

You probably don't want Rigidbodys at all. Just use colliders and change the direction of the plane (or destroy it) when you hit the ground.

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 mikebelotti · Aug 16, 2012 at 08:21 PM

To stop something from moving upon impact, you should be able to modify its rigidbody constraints. In the inspector, set it to lock its X, Y and Z positions so that the physics engine won't move it. (Or, in code, do something like `rigidbody.constraints = RigidbodyConstraints.FreezePosition`.)

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

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

Trying to use colliders on trees to interact with player 1 Answer

How do i prevent an imported Mesh from falling through Terrain? 3 Answers

Create a custom Collider? 4 Answers

Unity 4 - Sphere Falls through Terrain 2 Answers

Falling through ground with colliders 10 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