![]() RigidBod圜onstructionInfo groundBod圜onstructionInfo = new RigidBod圜onstructionInfo(0, groundMotionState, groundShape, new 3f(0, 0, 0)) MotionState groundMotionState = new DefaultMotionState(new Transform(new 4f( New 3f(0, 17, -10), 1.0f)) īroadphaseInterface broadphase = new DbvtBroadphase() ĬollisionConfiguration collisionConfiguration = new DefaultCollisionConfiguration() ĬollisionDispatcher dispatcher = new CollisionDispatcher(collisionConfiguration) ĬonstraintSolver solver = new SequentialImpulseConstraintSolver() ĭynamicsWorld = new DiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration) ĭtGravity(new 3f(0, -10 /* m/s2 */, 0)) ĬollisionShape groundShape = new StaticPlaneShape(new 3f(0, 1, 0), 0.25f /* m */) ĬollisionShape ballShape = new SphereShape(0.5f) Transform DEFAULT_BALL_TRANSFORM = new Transform(new 4f(new Quat4f(0, 0, 0, 1), Private static Sphere sphere = new Sphere() Private static boolean resetControlBall = false Private static boolean createNewShape = false Private static boolean applyForce = false ![]() Private static Set balls = new HashSet() Private static DynamicsWorld dynamicsWorld Private static final Transform DEFAULT_BALL_TRANSFORM = new Transform(new 4f(new Quat4f(0, 0, 0, 1), new 3f(0, 35, 0), 1.0f)) Public static BufferedImageLoader imageLoader = new BufferedImageLoader() Import .SequentialImpulseConstraintSolver My problem is clearly in the code commented in the render() method. ![]() ![]() Every object is translating appropriately, but they are not rotating as they should. ![]() I got a bit updated with my code and moved onto modern opengl (>3.0). I'll paste it again so the problem is more clear. Yes, I did mean to include the source code but unfortunately forgot it. In other words, what functionality is it exactly that you're currently using OpenGL's matrix functions for, but that you want to implement differently? Did you mean to include some source code in your post? (I see 'Source code' at the end, but don't see anything after that.)Īre you just using the OpenGL matrix functions for rendering purposes? Or are you also using them for physics by querying matrices from OpenGL? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |