Hi guys,
I'm a fairly new person to the bullet physics library. I am currently using JBullet for my physics in my game. How do I texture a cube with different images for different sides?
Texturing a Rigidbody
-
- Posts: 350
- Joined: Sat Jul 04, 2015 10:33 am
- Location: Bern, Switzerland
Re: Texturing a Rigidbody
Hi linyx,
How do you visualize your Bullet simulated cube? Bullet is a physics engine only, so it does not have any visualization capabilities. The only thing related to visualization it has is the bullet debug drawer. It can be implemented to draw the physics world within any kind of graphics engine, but for this purpose you need a separate graphics engine such as Ogre3D, Irrlicht, pure OpenGL etc. You probably have such an engine as you think about adding textures.
The basic procedure to visualize a cube in a graphics engine looks like this:
Tell me if this helps or if you need anything else.
How do you visualize your Bullet simulated cube? Bullet is a physics engine only, so it does not have any visualization capabilities. The only thing related to visualization it has is the bullet debug drawer. It can be implemented to draw the physics world within any kind of graphics engine, but for this purpose you need a separate graphics engine such as Ogre3D, Irrlicht, pure OpenGL etc. You probably have such an engine as you think about adding textures.
The basic procedure to visualize a cube in a graphics engine looks like this:
- Create a graphical cube within your graphics engine.
- Write a simple update loop for your graphics, within which you step your physics and then update the graphical cube position and orientation with the bullet cube's position and orientation.
Tell me if this helps or if you need anything else.