Search found 225 matches

by xexuxjy
Fri Jan 23, 2015 12:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: Scientific and Technical Academy Award for Bullet Physics!
Replies: 8
Views: 11720

Re: Scientific and Technical Academy Award for Bullet Physic

Congratulations! good to see you and Bullet getting some recognition.
by xexuxjy
Tue Jan 20, 2015 9:29 pm
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 20984

Re: What type of Collision Shape are better for Terrain?

I'll get the heightfield demo working and let you know.
by xexuxjy
Tue Jan 20, 2015 4:35 pm
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 20984

Re: What type of Collision Shape are better for Terrain?

oops. sorry .looks like i added my original project version rather than the instrumented one. try this.

If you're using eclipse, you might find this project setup helpful :

http://code.google.com/p/bullet-xna/dow ... akechanges
by xexuxjy
Tue Jan 20, 2015 3:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 20984

Re: What type of Collision Shape are better for Terrain?

i've included a patched version of the jbullet jar below
by xexuxjy
Tue Jan 20, 2015 2:55 pm
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 20984

Re: What type of Collision Shape are better for Terrain?

it should be in lib/jstackalloc/stack-alloc.jar as part of the normal jbullet distribution. Have you built JBullet from source before? if not it's a little tricky making sure that the instrumentor runs correctly on it. If you're using eclipse, you might find this project setup helpful : http://code....
by xexuxjy
Tue Jan 20, 2015 1:54 pm
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 20984

Re: What type of Collision Shape are better for Terrain?

Give this a try... (you'll need to rename the .txt to .java) , it's based off my c# version and hopefully I've found all the stack.allocs needed for JBullet. As it stands it expects the heightmap data as a float[] but you can change that.
by xexuxjy
Tue Jan 20, 2015 11:44 am
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 20984

Re: What type of Collision Shape are better for Terrain?

Yep exactly. In which case btHeightfieldTerrainShape should do the trick. Just had a quick look and seems as though it doesn't exist in JBullet as it stands, which is a bit annoying. It's a pretty simple shape collision shape though so shouldn't be too difficult to add in. I'll see if I can drag tog...
by xexuxjy
Tue Jan 20, 2015 9:49 am
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 20984

Re: What type of Collision Shape are better for Terrain?

Depends on the form of your terrain really. Theres a grid/heightmap based shape, or failing that bvhTriangleMesh for more complex versions.
by xexuxjy
Tue Jan 13, 2015 2:04 pm
Forum: General Bullet Physics Support and Feedback
Topic: StaticPlaneShape and SphereShape strange behaviour
Replies: 11
Views: 10935

Re: StaticPlaneShape and SphereShape strange behaviour

I was looking at the : "Why all Spheres does not falling down? Instead of it, they are balancing on eachother. And only when I move the lower Sphere, they are doing something like fall. But actually they does not moves in Z direction, only X and Y. So why it is?" part and checking the beha...
by xexuxjy
Tue Jan 13, 2015 1:31 pm
Forum: General Bullet Physics Support and Feedback
Topic: StaticPlaneShape and SphereShape strange behaviour
Replies: 11
Views: 10935

Re: StaticPlaneShape and SphereShape strange behaviour

hmm. running out of ideas I'm afraid. Can you try leaving the default angularDamping and restitution values alone and see if that helps?
by xexuxjy
Tue Jan 13, 2015 12:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: StaticPlaneShape and SphereShape strange behaviour
Replies: 11
Views: 10935

Re: StaticPlaneShape and SphereShape strange behaviour

Did it change your simulation at all? and just checking you made the change in the addBall function as well?
by xexuxjy
Tue Jan 13, 2015 10:32 am
Forum: General Bullet Physics Support and Feedback
Topic: btConvexTriangleMeshShape
Replies: 2
Views: 4031

Re: btConvexTriangleMeshShape

You most likely need to use the GImpact shapes instead. Have a look at that demo it should have what you need.
by xexuxjy
Tue Jan 13, 2015 9:02 am
Forum: General Bullet Physics Support and Feedback
Topic: StaticPlaneShape and SphereShape strange behaviour
Replies: 11
Views: 10935

Re: StaticPlaneShape and SphereShape strange behaviour

Yep, though should be :

RigidBodyConstructionInfo ballBodyConstructionInfo = new RigidBodyConstructionInfo(1,ballMotionState,ballShape,localInertia);

I think.
by xexuxjy
Mon Jan 12, 2015 11:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: StaticPlaneShape and SphereShape strange behaviour
Replies: 11
Views: 10935

Re: StaticPlaneShape and SphereShape strange behaviour

Been a while since I looked at JBullet, but I think your code for CalculateLocalInertia on your shapes is wrong.
You need to pass in a Vector3f to that call so that the values can be set, that should then be passed to the RigidBodyConstructionInfo.
by xexuxjy
Mon Jan 12, 2015 2:24 pm
Forum: General Bullet Physics Support and Feedback
Topic: Raycasting of box - which side of box(voxel) i am looking at
Replies: 3
Views: 5379

Re: Raycasting of box - which side of box(voxel) i am lookin

You could modify the libgdx code to give you more access to the callback info, something like the below, though it's not particularly thread safe. That would give you the hit point and contact normal. But you'd still need to use that to decide which face had been hit. public static ClosestRayResultC...