0
votes

I have got stupid and annoying problem in my app. I am using bullet physics and I've started with hello world example on wiki: http://bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World

There is someting like this:

btDefaultMotionState* fallMotionState =
            new btDefaultMotionState(btTransform(btQuaternion(0,0,0,1),btVector3(0,50,0)));

What is described as set object 50m above something. So I can change the height but nothing more. I can't move it left, right - anything. Also when I set 0 everywhere ( I mean in btVector3) the object is jumping up rather than falling down or better stay still.

Can someone help me with that?

Also are there any materials except those on bullets page where are some tutorials or something?

1
There aren't a lot of tutorials out there for Bullet, sadly. Second, placing the object at (0,0,0) places it inside the ground, so its behavior will be strange, remember, you're not placing a point. Try placing it at (0,1,0), to start?Sam DeHaan
@SamDeHaan I can set the height. But I can't set the x or z axis. By the way now it works with height - it doesn't move.sebap123
What have you modified from the base example? The example itself only prints out the height (y) value in its loop, so you've at least changed that. The fact that you're using the opengl tag implies that you're attempting to visualize, too?Sam DeHaan
Be sure to try this question at gamedev.stackexchange.comuser180326
@SamDeHaan now I am using the position of rigidbody to position the ball in opengl. But I don't think that opengl changes anything except visualizing it. So mayby I'll ask in other words. How I can make this body move from left to right not from up to down?sebap123

1 Answers

0
votes

I have found out that it is possible to change the position. I didn't saw it.

And the reason why it is jumping at 0 it is because it is 'inside' other object and then whole engine starts to act crazy. So don't put one object into another.