problem with collision detection when one box is being moved

ajitsmile
Posts: 2
Joined: Wed Mar 26, 2008 6:31 am

problem with collision detection when one box is being moved

Post by ajitsmile »

I am doing a fork lift simulation. i have attached a physics body(liftbody) to fork lift and i have added other boxes in the scene. when i try to lift any box in the scene, the liftbody is getting inside the box. as a result, box is flying in all direction. the problem is collision is not being detected the moment the lift body's boundary touched any box. where as collision between the boxes is working fine in the scene. why is this problem coming when i am moving one of the object in collision manually?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: problem with collision detection when one box is being moved

Post by Erwin Coumans »

ajitsmile wrote:I am doing a fork lift simulation. i have attached a physics body(liftbody) to fork lift and i have added other boxes in the scene. when i try to lift any box in the scene, the liftbody is getting inside the box. as a result, box is flying in all direction. the problem is collision is not being detected the moment the lift body's boundary touched any box. where as collision between the boxes is working fine in the scene. why is this problem coming when i am moving one of the object in collision manually?
Which physics engine are you using? This is the general section. If it is Bullet, we can move the issue to the right forum section, and continue the answer from there.

You can make the liftbody a kinematic object or create a powered slider joint (but in that case, the mass ratios have to be chose carefully).

Thanks,
Erwin
ajitsmile
Posts: 2
Joined: Wed Mar 26, 2008 6:31 am

Re: problem with collision detection when one box is being moved

Post by ajitsmile »

yes i am using the bullet physics itself.I cannot use powered slider joint as at no time object will be a joint of lift body. that will negate the chances of implementing basic errors in lifting an object.If i make the liftbody as Kinematic, collisions itself is not happening. what i want is to lift objects of varying mass. i should be easily able to lift 50kg item...where as lifting shouldn't be smooth for 500kg(ex). i know i can write my algorithms to get this done, once i am able to lift an object.now what is happening is, if an object is 50kg..when i try to lift it..it is not moving along with the lift body..where as it is taking it as an impact and flying in the air.if i increase the mass of the object, flying distance is getting reduced. but at no weight is the object sitting on top of the liftbody. this is very crucial for my project. as whole projects has been stalled for this reason..