try to simulate soft body, bind with ogre
-
foolegg
- Posts: 5
- Joined: Tue Dec 22, 2009 3:32 pm
try to simulate soft body, bind with ogre
a small test
this patch and ball is a ogre format mesh, create in blender
and I'm trying convert this ball to a convexhull, testing...
You do not have the required permissions to view the files attached to this post.
Last edited by foolegg on Wed Dec 23, 2009 4:12 pm, edited 1 time in total.
-
foolegg
- Posts: 5
- Joined: Tue Dec 22, 2009 3:32 pm
Re: try to simulate soft body, combin in ogre
e....
According to my understanding, the *ponit is a array like this format:
just like vertices array
and numPoints is the count of vertics
it's correct?
Code: Select all
btConvexHullShape::btConvexHullShape( const btScalar * points = 0, int numPoints = 0, int stride = sizeof(btVector3) )
this constructor optionally takes in a pointer to points.
Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory. It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint. btConvexHullShape make an internal copy of the points. Code: Select all
{ x0, y0, z0, x1, y1, z1, x2, y2, z2 ........ }and numPoints is the count of vertics
it's correct?
-
foolegg
- Posts: 5
- Joined: Tue Dec 22, 2009 3:32 pm
Re: try to simulate soft body, combin in ogre
yes, I deal with convexhull problem, but encounter another...
like this
the softbody pass the sphere after collision.
then,I scale the sphere, I enlarge this sphere 5% with
it well
what should I do to deal with this problem? thx for any information.
this is src
in line 329
s = 2.0 work well
s = 1.9 will with trouble
ps: there is some chinese charact in src commit, maybe you system cannot not display it, do not worry about it...
like this
the softbody pass the sphere after collision.
then,I scale the sphere, I enlarge this sphere 5% with
Code: Select all
bshape->setLocalScaling(btVector3)what should I do to deal with this problem? thx for any information.
this is src
in line 329
Code: Select all
btScalar s = 2.0;
bshape->setLocalScaling(btVector3(s,s,s));
s = 1.9 will with trouble
ps: there is some chinese charact in src commit, maybe you system cannot not display it, do not worry about it...
You do not have the required permissions to view the files attached to this post.
-
foolegg
- Posts: 5
- Joined: Tue Dec 22, 2009 3:32 pm
Re: try to simulate soft body, combin in ogre
I record this video demo, to show the problem
You do not have the required permissions to view the files attached to this post.