- Home /
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.
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.
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)
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...
Your answer
![](https://koobas.hobune.stream/wayback/20220612124615im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
,Fast Moving Gameobject Collision and Trigger Check Failed 0 Answers
simple onCollision and onTrigger problem 1 Answer
Access other collider without use of Trigger collider. 1 Answer
Point of contact on other object in OnTriggerEnter 1 Answer
Transform collider not detecting collision on rigidbody collider 2 Answers