chen.chen Posted November 25, 2015 Posted November 25, 2015 hello. I cannot get BodyRigid's contacts callbacks ,because I set the node position (by setWorldTransform) in C++. I want to control the node position through ART Track and get contacts with other BodyRigid, how can I do? I want the BodyRigid is kinematic (controlled by transform, not by force, but can get contact callback). thank you!
silent Posted November 27, 2015 Posted November 27, 2015 Hi Chen, I want the BodyRigid is kinematic (controlled by transform, not by force, but can get contact callback). Unfortunately, Physical bodies will not work in that way. Could you please describe the use-case that you are trying to implement in more details? Probably, we can suggest you a different way to do this task :) Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
chen.chen Posted November 27, 2015 Author Posted November 27, 2015 Thanks! In my virtual scene, the virtual hand position was controlled by leap motion,I want to get the contacts of the virtual finger with others. I want to know whether the virtual hand grasp other objects. The hand has 5 fingers. The finger can be described by the ShapeCapsule, ShapeCylinder or ShapeConvex ,but not sphere or box。 The function "engine.world.getCollisionObjects" can only get contacts of BoundSphere , BoundBox or BoundFrustum with others.(so I did not take this way). The BodyDummy cannot get contact callback. I use BodyRigid and set the mass to 0.(just use the shape and get collisions) So is there any way to do this?
maxi Posted December 2, 2015 Posted December 2, 2015 Hi Chen, You need to call body.setFrozen(0) for every body instance, and contact callbacks must fire. Also note, that callbacks won't fire if you set physics gravity to 0 (engine.physics.setGravity).
Recommended Posts