• 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 Orami · Jun 21, 2017 at 10:28 AM · rigidbodyontriggerenteroncollisionenteriskinematic

rigid body isKinematic not triggering as expected?

So if I have a rigidBody attached to a cube with a trigger the same size as the collider of the cube and I spawn another cube with a rigidBody that is overlapping the first cube I have tried using onCollisionEnter and onTriggerEnter, but neither seem to trigger when the spawn happens. They will work if the rbs.isKinematic are set to false, but instead of triggering once they trigger once for each collider every update. Does anyone know a better way to accomplish this?

Here is generally how the building works. So you have a visual.

https://www.youtube.com/watch?v=spcuR-cXMH8&t=3s

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

Answer by FlaSh-G · Jun 21, 2017 at 11:49 AM

IsKinematic's purpose is literally to disable everything the Rigidbody does. It's like enabled = false. Of course, this includes collision events. Disabling isKinematic is for letting another system (like an Animator) take full control of the object. For a Cutscene, for example. It's not intended for freezing movement.

If you want an immovable object that checks if it happens to have spawned inside a trigger, you can use the Rigidbody's constraints.

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 Orami · Jun 21, 2017 at 12:29 PM 0
Share

Is there any collider based trigger I can use to achieve the same thing? Or maybe some other approach? Right now I can get it to add to one object, but I can't get it to add to multiple (like planks going across multiple posts)

avatar image
0

Answer by Orami · Jun 21, 2017 at 03:40 PM

Well looks like I will use a Physics.BoxCastAll and slide a box collider down the part that was just placed to find what parts it should be connected to...

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

84 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Point of contact on other object in OnTriggerEnter 1 Answer

,Fast Moving Gameobject Collision and Trigger Check Failed 0 Answers

Transform collider not detecting collision on rigidbody collider 2 Answers

simple onCollision and onTrigger problem 1 Answer

Access other collider without use of Trigger collider. 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges