Jump to content
  • Advertisement
Sign in to follow this  
shotgunnutter

tutorial for physics library "bullet"

This topic is 4003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to learn to use bullet. I need a tutorial on how to create the various types of object. How do I: 1) Create static indexed triangle mesh from memory. 2) Create a sphere. 3) Drop the sphere from a height so that it bounces on the trimesh. 4) Access the geometry of both objects in order to render them using my opengl renderer. I'm guessing that this is a simple operation. Does anybody have such a tutorial? [Edited by - shotgunnutter on October 28, 2007 9:50:27 AM]

Share this post


Link to post
Share on other sites
Advertisement
This is not a simple operation.

For operation 1, use a physics library which handles loading meshes from memory.
For operation 2, represent a sphere within that library.
For operation 3, apply gravity and elasticity to the sphere and mesh, using the physics library.
For operation 4, load the mesh using your graphics library and draw it at the correct position.

Share this post


Link to post
Share on other sites
right... I'm using bullet. I can already load meshes from file. Perhaps I should have said that more clearly in the OP. The problem is that there aren't any tutorials that I can find. The demo applications do more than just define the objects and do a simple test between them, they also render the application using glut and have multiple inheritance. I can't glean the library calls used to create the physics objects.


Share this post


Link to post
Share on other sites
Oh, so "bullet" was the name of a library as opposed to the typical gun-delivered projectile. Ignore me, then [smile]

Share this post


Link to post
Share on other sites
Here is a screenshot of my application:
screenshot of game

The character is an md2 mesh. The geometry of the landscape is loaded from disk and stored in memory as a hierarchy of hit boxes. To add the triangles to the physics library, I would recursively scan through the model adding any geometry which is flagged as SOLID to the collision model.

Share this post


Link to post
Share on other sites
Quote:
Original post by ToohrVyk
Oh, so "bullet" was the name of a library as opposed to the typical gun-delivered projectile. Ignore me, then [smile]


yes... curse the naming of libraries and applications. I dread the day I start a thread about GIMP.

Share this post


Link to post
Share on other sites
A bit offtopic, but I am making a library called GIMP ;) hehe

(Gaming Improves with MultiPlayer)

Its gonna be a networking library with some basic start-up, running and shutdown calls so no one needs to do any lowlevel coding. However, more recently (last couple of weeks), I have been adding it to my game engine so it may or may not go public for years lol (sole programmer :( ). And its name has/will be changing...

I should release this part of it though, just for fun.

Share this post


Link to post
Share on other sites
All I want to do is know how to create objects with this library and bang them together, then access their contents so I can render them. Has anybody got a simple piece of code which does this?

Share this post


Link to post
Share on other sites
Quote:
Original post by blackbird04217
A bit offtopic, but I am making a library called GIMP ;) hehe

(Gaming Improves with MultiPlayer)

Its gonna be a networking library with some basic start-up, running and shutdown calls so no one needs to do any lowlevel coding. However, more recently (last couple of weeks), I have been adding it to my game engine so it may or may not go public for years lol (sole programmer :( ). And its name has/will be changing...

I should release this part of it though, just for fun.


I made a library called g_string (my first name is Gavin) which is a C library for handling strings. But I was joking. The people who made GIMP (gnu image manipulation program) must have been serious. I once had to explain in front of an A level class what the alternate meaning of the acronym was, to the teacher for Gods sake.

But anyway... Can somebody answer my original question?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!