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
4
Question by Lboy · May 22, 2012 at 02:14 AM · rigidbodymesh colliderfalling-through-floorfalling-through-terrain

Rigidbody object falling through floor.

I have a rigidboy object that needs to act as a trigger, is has a rigidbody/mesh collider/mesh renderer/mesh filter attached to it. The collision object is positioned on the floor beneath it, it has a mesh filter and a mesh collider, it has an emitter attached to it which is coded to turn on when the collision is true.

going back to the rigidbody, the convex is ticked and the is trigger is ticked on the mesh collider, this is because it needs to work with its colliding object, but the problem I have is that the object keeps falling through the floor when is trigger is ticked.

When i remove the is trigger tick, it doesnt fall through the floor, but it doesnt act as a trigger which I need it to.

If this doesnt make much sense, please see this thread i made about another previous issue...thanks. link text

Comment
Add comment · Show 8
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 Lo0NuhtiK · May 22, 2012 at 02:17 AM 0
Share

If you have that waterfall plane's collider set isTrigger and your trigger script on it, then the rock with collider not set isTrigger should fire that script and keep your rock from falling through the ground.

avatar image Lboy · May 22, 2012 at 11:56 PM 0
Share

but if the rock collider isTrigger isnt set, how will it tell the plane collider the collision is true? I tried your method but didnt get much luck.

avatar image Lo0NuhtiK · May 23, 2012 at 12:11 AM 0
Share

Should work. Just copy/pasted that C# code I posted the other night in a script (deleted the non-drag&drop emitter stuff off of it) , attached it to a game object, put a collider on it with isTrigger set. Then put a child object on that with a particle emitter/animator/renderer. Drag/dropped the child object onto the parents script slot for the emitter object. ... Then made another object with a rigidbody and collider not trigger, tagged it as "Rock" , moved it into the trigger in play-mode and it shut the emitter off. $$anonymous$$oved it out, emitter turned back on.

avatar image Lboy · May 23, 2012 at 01:04 AM 0
Share

I'm attempting this now, but i keep getting the following error, "A namespace can only contain types and namespace declarations" on lines 4, 6 & 11.

avatar image Lboy · May 23, 2012 at 02:21 AM 0
Share

Ok I got around that issue, and i followed the rest of your steps, but the emitter is still not reacting to the rigidbody when they come into contact alt text

alt text

Show more comments

8 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Unk · May 22, 2012 at 04:33 AM

isTrigger will make that collider pass through other colliders so you might make another collider a child that will be affected by physics or use OnCollisionEnter.

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 Lboy · May 22, 2012 at 11:58 PM 0
Share

Thanks this might explain the whole issue, I take it OnCollisonEnter would mean I would have to re-write the script into Java?

its currently this in C#...

public class Waterfalltrigger : $$anonymous$$onoBehaviour {

ParticleEmitter myEmitter ;

void Start(){ myEmitter = GetComponentInChildren() as ParticleEmitter ; }

void OnTriggerEnter(Collider other){ if(other.CompareTag("Respawn")) myEmitter.emit = false ; }

void OnTriggerExit(Collider other){ if(other.CompareTag("Respawn")) myEmitter.emit = true ; } }

avatar image Lboy · May 23, 2012 at 12:01 AM 0
Share

the "Respawn" tag is given to my rock

avatar image marcobolanosb · May 31, 2020 at 11:26 PM 1
Share

thanks man.. you just made my day 8 years later :)

avatar image
2

Answer by e-bonneville · May 23, 2012 at 12:14 AM

Uncheck the Use Gravity option on your rigidbody to prevent gravity from being applied to it.

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 douglasdaquino · Jun 13, 2020 at 01:19 AM 0
Share

thanks man, worked like a charm for me

avatar image
1

Answer by crummyrex · Nov 20, 2012 at 12:34 AM

attach a collider to it (box collider recommended)

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 Lboy · Nov 20, 2012 at 09:47 PM 1
Share

hey thanks for the help, I've long since abandoned this particular project but when dealing with rigidbody issues in the future, I'll bare this in $$anonymous$$d.

avatar image
0

Answer by stingman · May 22, 2012 at 02:20 AM

you could always just change your rigidbody to "isKinematic" to prevent it from falling.

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 Lboy · May 22, 2012 at 11:49 PM 0
Share

I tried this but its doesnt move what so ever

avatar image Willard720 · Aug 16, 2018 at 11:18 PM 0
Share

That's way overkill.

avatar image SuperCrusher22 · Aug 14, 2021 at 11:44 PM 0
Share

This helped. Thanks.

avatar image
0

Answer by Lboy · May 23, 2012 at 03:09 AM

Ok ive figured it out, the waterfall trigger needs convex ticked. work fine now. Thanks guys

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 venkspower · May 23, 2012 at 04:54 AM 2
Share

Do not ever write the comments in the answer section.

  • 1
  • 2
  • ›

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

16 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

Related Questions

Is it possible to make a Mesh Collider thicker? 2 Answers

Object falling through floor 2 Answers

Anyway to make my object not fall through the floor without convex? 0 Answers

Compute mesh inertia tensor failed - NOT the usual problem 0 Answers

3d Jigsaw puzzle - how to combine dragged objects (Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5.)? 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