Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  What's up with JBullet?  (Read 2935 times)
0 Members and 2 Guests are viewing this topic.
Offline elias4444

Full Member
**

Posts: 231



« on: 2010-08-29 15:13:05 »

I was just wondering if there's been any recent updates in the JBullet world anywhere? The version available for download at jbullet.advel.cz is out of date now, although it looks like the jME guys have a more complete port in their jME3 nightly downloads. Is anyone actively working on it anymore?

Offline jezek2

Sr. Member
**

Posts: 357
Medals: 3



« Reply #1 on: 2010-08-29 16:03:49 »

There are recent changes, I just somewhat forgot to officially release them. Although the latest development version is available in the Monotone repository.

Here is a list of changes from latest official release:
- Added KinematicCharacterController, GhostObject and CharacterDemo
- Added DbvtBroadphase
- Added serialization of BVH
- Updated most classes to match Bullet 2.72
- Added CCD motion clamping fix from Bullet 2.74
- Removed usage of interface calls
- Added stackless traversal in OptimizedBvh

The last two gives observable performance boost. I'll look into making an official release soon Smiley
Offline elias4444

Full Member
**

Posts: 231



« Reply #2 on: 2010-08-29 18:53:12 »

Ah, good to know! Thank you Jezek. You've done amazing work porting that library over to Java!

Games published by our own members! Go get 'em!
Offline arielsan

Full Member
**

Posts: 120
Medals: 4



« Reply #3 on: 2010-10-08 15:55:42 »

Hi Jezek, I am trying to integrate JBullet in a 2D game.

From the bullet code snippet documentation, they recommend to use:

1  
2  
body->setLinearFactor(btVector3(1,0,1));
body->setAngularFactor(btVector3(0,1,0));


to add constraints and simulate a two dimensional movement.

That is implemented since Bullet 2.75 version.

Is there any chance to add that feature to JBullet? if not, do you know a workaround to do add those constraints?

Thanks in advance, for the answer and for Bullet port to Java.

Offline elias4444

Full Member
**

Posts: 231



« Reply #4 on: 2010-10-09 19:24:38 »

Arielsan, if you're just interested in doing 2D physics, JBox2D is probably a better fit for you.

Offline jezek2

Sr. Member
**

Posts: 357
Medals: 3



« Reply #5 on: 2010-10-10 14:54:45 »

1  
2  
body->setLinearFactor(btVector3(1,0,1));
body->setAngularFactor(btVector3(0,1,0));


to add constraints and simulate a two dimensional movement.

That is implemented since Bullet 2.75 version.

Is there any chance to add that feature to JBullet? if not, do you know a workaround to do add those constraints?

Tried to port this change, but doesn't work as expected. I suspect it has dependency on some previous patch or I've overlooked something. If anyone is interested here is the patch (based on SVN revision 1645) for playing Smiley

There is workaround by using 6dof constraint, though it is more expensive and there might be some jerking involved.
Offline arielsan

Full Member
**

Posts: 120
Medals: 4



« Reply #6 on: 2010-10-10 16:04:11 »

Thanks jezek2, I will take a look to both the patch and the workaround you mention.


Offline arielsan

Full Member
**

Posts: 120
Medals: 4



« Reply #7 on: 2010-10-11 10:55:57 »

Arielsan, if you're just interested in doing 2D physics, JBox2D is probably a better fit for you.

I am making a game with a top down perspective, I want entities with a physics body to have friction in their movement with a plane below them to simulate a correct behavior, I believe I can't implement that using JBox2D which seems more for platformer games, but I could be missing something. If you know some way to implement what I need with JBox2d, then I could use it instead JBullet.

Offline KrawallMann

JGO n00b
*

Posts: 1



« Reply #8 on: 2011-12-12 09:25:22 »

Hi,

just wanted to ask if you found a solution for this problem as I'm currently facing the same problem.

 - KM
Offline arielsan

Full Member
**

Posts: 120
Medals: 4



« Reply #9 on: 2011-12-12 09:31:47 »

Yes, I used Generic6DofConstraint constraints, it has been a while since I touched that code so I don't remember exactly what I did and why, I found some code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
      final Transform frameInA = new Transform();
      final Transform frameInB = new Transform();

      frameInA.setIdentity();
      frameInB.setIdentity();

      frameInA.origin.x = -2.5f;
      frameInB.origin.x = 2.5f;

      Generic6DofConstraint generic6DofConstraint = new Generic6DofConstraint(rigidBody0, rigidBody1, frameInA, frameInB, false);

      generic6DofConstraint.setLinearLowerLimit(new Vector3f(-5f, 0f, 0f));
      generic6DofConstraint.setLinearUpperLimit(new Vector3f(5f, 0f, 0f));

      generic6DofConstraint.setAngularLowerLimit(new Vector3f(0f, 0f, (float) (Math.PI / 6)));
      generic6DofConstraint.setAngularUpperLimit(new Vector3f(0f, 0f, -(float) (Math.PI / 6)));

      world.addConstraint(generic6DofConstraint, true);


But as I was saying, I don't remember why it was for exactly, only wanted to share to give an idea.

Hope it helps.

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.103 seconds with 17 queries.