0

We made an opengl game for the ipad and wrote everything we need except the collision detection. So we already have the renderer, the shaders etc.

My question now is: How do I integrate bullet? I already wrote my bullet collision code in a class Physicsmanager. Our game is basically set in a cave and first person perspective.

What I did is:

-Set up a dynamicsworld.
-Read in the cave model and store vertices/indices in an indexed mesh and add that mesh to a TriangleIndexVertexArray. Then generating a trimesh shape and the rigid body for it.
-For the player I just take a sphere as dynamic rigidbody.
-Then I do a stepsimulation.

Now how can integrate this into our existing framework (no bulletcode except in physicsmanager). When/where do I call it (hence creating a phisycsmanager object in the main file).

BTW: I followed pretty much the tutorial/the instructions written in the hello world "demo". The trimesh I solved the same way as they did in the Benchmarkdemo.

Fattie
  • 27,874
  • 70
  • 431
  • 719
R6D1H2
  • 47
  • 2
  • 10
  • `I` is always capitalized in English, when you use it to refer to yourself. – Robert Harvey Jun 01 '14 at 20:58
  • Yeah thanks for the fix. I should really proofread it better next time sorry. – R6D1H2 Jun 01 '14 at 21:05
  • hi @R6D1H2 also - it really helps if you get **correct capitalization** on things that are actually classes. For example **btDynamicsWorld** is actually **btDynamicsWorld** - not just "dynamicsworld" heh. it really helps if you are very careful about this sort of thing. – Fattie Nov 08 '16 at 16:13

0 Answers0