Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (212)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Game Mechanics / Character_Object..Is it possibble to initialize with no acting forces at all on: 2012-02-28 14:57:39
I am working on a game that introduces a Jbullet Character_object every certain amount of time into the physics world. The physics world only contain Static_Objects besides the character objects being introduced. Here are the two game states.

Stable state - I introduce only one Character_object into the system every 10 seconds , the game does not slow down the frames per second at all.

Unstable system
- Enter a Character_object every three seconds. The games becomes slow and the FPS slow down  from 60 FPS  to 8 FPS. The system never recovers again.

The desired system is to be able to enter into the physics world a character_object every three seconds. Is there any way to enter into the world a character_object that does not introduce any force at all while the velocity of the object falls to a certain threshold ?

Here are the constructors for the Character_Object and the Static_object :

   public Character(String name, String filepath,Vector3 pos) {

      //Get box dimensions from libgdx
      Vector3 boxDims = box.getDimensions();
      //Character shape, so construct the half extents and convert to JBullet's Vector type
      Vector3f halfExtents = new Vector3f(boxDims.x/2,
      CylinderShape shape = new CylinderShape(halfExtents);
      rigidBody = Physics.constructRigidBody(shape,
                // Just bouncy
      rigidBody.setCollisionFlags( rigidBody.getCollisionFlags() | CollisionFlags.CHARACTER_OBJECT);

public StaticMeshObject(String name, String filepath,Vector3 pos) {
      meshInterface = new TriangleIndexVertexArray();      
      trimesh = new IndexedMesh();
      BvhTriangleMeshShape meshShape = new BvhTriangleMeshShape(meshInterface, true, true)
      rigidBody = Physics.constructRigidBody(meshShape,
      rigidBody.setCollisionFlags(rigidBody.getCollisionFlags() | CollisionFlags.STATIC_OBJECT);
Pages: [1]
numerical (140 views)
2017-02-21 07:32:16

numerical (140 views)
2017-02-21 07:31:46

theagentd (247 views)
2017-02-18 13:42:33

theagentd (249 views)
2017-02-18 13:35:16

h.pernpeintner (1411 views)
2017-01-24 22:39:11

h.pernpeintner (1400 views)
2017-01-24 22:38:32

Galdo (1961 views)
2017-01-12 13:44:09

Archive (2025 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2562 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2322 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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‑
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!