Small deformation demo, gimpact shape used.
Video: http://www.youtube.com/watch?v=oALjGVzN8v4
Download: http://code.google.com/p/game-ws/
Select deform_rXXX.7z.exe (self-extracting archive).
Usage: Run demo.exe (in "release" folder).
W,S,A,D and mouse to move.
LMB click to shoot.
F9 switch debug mode (collision triangles and points are visible in debug mode).
ESC to enter GUI / release mouse.
---------------------------
P.S. See also the attachment "HitTriangleDemo.zip" below.
Deformation demo.
-
- Posts: 144
- Joined: Fri Aug 01, 2008 6:36 am
- Location: Bonn, Germany
Deformation demo.
Last edited by mi076 on Sat Nov 06, 2010 3:59 pm, edited 1 time in total.
-
- Posts: 19
- Joined: Fri Sep 05, 2008 8:54 pm
Re: Deformation demo.
hello,
thanks for your demo.
i am trying to use GImpact shapes with GImpact, both deforming shapes as collision shapes..., I update the positions and am calling postUpdate(), but for some reason the collision detection fails.
i was wondering what you had to do in special to get bullet to recognize collisions for deforming GImpact shapes.
thank you.
ram.
thanks for your demo.
i am trying to use GImpact shapes with GImpact, both deforming shapes as collision shapes..., I update the positions and am calling postUpdate(), but for some reason the collision detection fails.
i was wondering what you had to do in special to get bullet to recognize collisions for deforming GImpact shapes.
thank you.
ram.
-
- Posts: 144
- Joined: Fri Aug 01, 2008 6:36 am
- Location: Bonn, Germany
Re: Deformation demo.
I use ray test :
create custom ray callback result with access to LocalShapeInfo (index, subpart id),
register Gimpact collision algorithm and create Gimpact mesh shape.
Send ray, get index, access Gimpact shape's vertex data. Process and, optionally, modify it (deform).
Attached is very very minimal Bullet-like example of above... i have posted it somewhere already... this is little updated version.
Thanks..
create custom ray callback result with access to LocalShapeInfo (index, subpart id),
register Gimpact collision algorithm and create Gimpact mesh shape.
Send ray, get index, access Gimpact shape's vertex data. Process and, optionally, modify it (deform).
Attached is very very minimal Bullet-like example of above... i have posted it somewhere already... this is little updated version.
BTW, just an attempt to guess : may be you are using custom "contact added callback" (it has index and subpart id too, if available)? Have you setbut for some reason the collision detection fails.
Code: Select all
body->setCollisionFlags(body->getCollisionFlags()|btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
You do not have the required permissions to view the files attached to this post.
-
- Posts: 19
- Joined: Fri Sep 05, 2008 8:54 pm
Re: Deformation demo.
thank you - it seems to work.