Page 1 of 1

isKinematic related bugs

Posted: Tue Sep 10, 2013 7:35 am
by compass3
Hi,

I find if I assign a same value to the ChipmunkBody.isKinematic for twice I will get bug. The isKinematic is in fact not changed, but it seems by doing this, Chipmunk will change some thing.

Re: isKinematic enabled twice and get bug

Posted: Tue Sep 10, 2013 7:52 am
by compass3
By the way, it also seems the isKinematic not works well in the Unity Editor. Sometimes click on the selection does not take effect on the object.

Re: isKinematic enabled twice and get bug

Posted: Tue Sep 10, 2013 2:41 pm
by compass3
And it seems, every time when a object update its isKinematic, it will lose its mass and moment assigned to it previously.

Re: isKinematic enabled twice and get bug

Posted: Thu Sep 12, 2013 11:20 am
by slembcke
Hmm. It's on the bug tracker now. I did a little testing on that feature, but apparently not enough. :-\

Re: isKinematic related bugs

Posted: Fri Sep 13, 2013 8:33 am
by compass3
I find when I set a body to Kinematic. Chipmunk2D will remove it from the space. Which will result in the physics engine do not detect collisions related to this object. However, I need a kinematic object to detect collisions, because I use the shapes as sensor.

I mean I need to disable the physics but enbable the sensor. It seems the only way is to disable the body.

Currently, I am trying to update the transform of static shapes. And In PhysX, I do this by set the rigidbody to kinematic.

Re: isKinematic related bugs

Posted: Mon Sep 16, 2013 2:16 pm
by ashwin911
I also have a problem when try to switch off kinematic by doing isKinematic = false in code during runtime. Chipmunk physics stop working and a whole lot of errors appear in the log like this one:

Code: Select all

transform.position assign attempt for 'Cube' is not valid. Input position is { NaN, NaN, 0.000000 }.
UnityEngine.Transform:set_position(Vector3)
ChipmunkManager:FixedUpdate() (at Assets/Plugins/Chipmunk2D/ChipmunkManager.cs:19)