Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  What's up with JBullet?  (Read 4116 times)
0 Members and 1 Guest are viewing this topic.
Offline elias4444

Junior Devvie





« Posted 2010-08-29 19: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
« Reply #1 - Posted 2010-08-29 20: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

Junior Devvie





« Reply #2 - Posted 2010-08-29 22: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! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline arielsan
« Reply #3 - Posted 2010-10-08 19: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

Junior Devvie





« Reply #4 - Posted 2010-10-09 23:24:38 »

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

Offline jezek2
« Reply #5 - Posted 2010-10-10 18: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
« Reply #6 - Posted 2010-10-10 20:04:11 »

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


Offline arielsan
« Reply #7 - Posted 2010-10-11 14: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

Innocent Bystander





« Reply #8 - Posted 2011-12-12 14: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
« Reply #9 - Posted 2011-12-12 14: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]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (55 views)
2014-12-15 09:26:44

Mr.CodeIt (46 views)
2014-12-14 19:50:38

BurntPizza (91 views)
2014-12-09 22:41:13

BurntPizza (113 views)
2014-12-08 04:46:31

JscottyBieshaar (83 views)
2014-12-05 12:39:02

SHC (92 views)
2014-12-03 16:27:13

CopyableCougar4 (101 views)
2014-11-29 21:32:03

toopeicgaming1999 (160 views)
2014-11-26 15:22:04

toopeicgaming1999 (163 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!