Search found 225 matches

by xexuxjy
Thu Mar 06, 2014 12:32 pm
Forum: General Bullet Physics Support and Feedback
Topic: How To Apply Gravity To An Actor On A Spherical Plane
Replies: 10
Views: 15857

Re: How To Apply Gravity To An Actor On A Spherical Plane

From a quick glance through I don't believe it would make any difference. The world gravity value is assigned to newly added objects, theres nothing stopping you applying a new gravity value to each rigid body on each step (ok thats a minor change) . It will then be updated as a normal force through...
by xexuxjy
Mon Mar 03, 2014 3:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: output not shown with bullet physics library
Replies: 10
Views: 9920

Re: output not shown with bullet physics library

how many simulation loops did you go through? what you should be doing is: Create physics world (DiscreteDynamicsWorld, Dispatcher, Broadphase) create your collision shapes and rigid bodies. add them to the world. loop , stepping the simulation until you've reached the number of steps you want, or a...
by xexuxjy
Mon Mar 03, 2014 12:46 pm
Forum: General Bullet Physics Support and Feedback
Topic: output not shown with bullet physics library
Replies: 10
Views: 9920

Re: output not shown with bullet physics library

I'm not sure what you're expecting to see from that example? - you're creating and deleting a collision shape, thats all. Theres no code to setup a physics world, add objects or step the simulation. Looking at that example web page I think they're just testing for general compilation errors rather t...
by xexuxjy
Mon Feb 24, 2014 11:23 am
Forum: General Bullet Physics Support and Feedback
Topic: why does m_nodes.reserve(m_nodes.size()*2+1) do this?
Replies: 1
Views: 2651

Re: why does m_nodes.reserve(m_nodes.size()*2+1) do this?

It's a general pattern for resizing collections, growing it by 1 each time can be very in-efficient as you re-allocate memory each time you add a single item. Doubling up like this usually works better , though you sometimes have to keep an eye on it to avoid lots of unused space.
by xexuxjy
Thu Feb 20, 2014 12:38 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet and Unity
Replies: 2
Views: 4392

Re: Bullet and Unity

As Unity only really offers c# , boo and javascript options for coding then I think you'd struggle to use it, though you could use something like http://code.google.com/p/bullet-xna/ (shameless plug). I haven't touched it for a while but theres no reason it wouldn't work with Unity. Out of interest ...
by xexuxjy
Tue Feb 04, 2014 10:12 am
Forum: General Bullet Physics Support and Feedback
Topic: Simple player repulsion, level collision and raytrace shoot.
Replies: 4
Views: 6366

Re: Simple player repulsion, level collision and raytrace sh

Ah ok, sorry didn't notice the bit about lack of dynamics. The above comment on an impulse force probably not that helpful then. Looking again I'm not sure that just modifiying the length of the player velocity vector in yout callback vector will do what you want(in fact I'm a little surprised you c...
by xexuxjy
Mon Feb 03, 2014 1:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: Simple player repulsion, level collision and raytrace shoot.
Replies: 4
Views: 6366

Re: Simple player repulsion, level collision and raytrace sh

How are you setting up the rigidBodies for your players? From the code it looks like you're trying to 'override' the results of the physics by forcing your own values back over the calculated ones. You probably should update your player position based on the capsules position rather than the other w...
by xexuxjy
Fri Jan 03, 2014 4:45 pm
Forum: General Bullet Physics Support and Feedback
Topic: Difference of getCenterOfMassTransform & getWorldTransform?
Replies: 2
Views: 3583

Re: Difference of getCenterOfMassTransform & getWorldTransfo

The two appear to refer to the same variable (m_worldTransform) , I suspect it's just a hang over from an old library merge.
by xexuxjy
Fri Jan 03, 2014 4:10 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision detection is eratic / not working :(
Replies: 6
Views: 6059

Re: Collision detection is eratic / not working :(

Sorry ignore original post - setupRigidBody relies on the localInertia values in it's ctor so you would need to add all your children to the compound shape before calculating localInertia and creating the rigidBody.
by xexuxjy
Fri Jan 03, 2014 12:23 pm
Forum: General Bullet Physics Support and Feedback
Topic: My complaints on bullet's source code quality
Replies: 11
Views: 13206

Re: My complaints on bullet's source code quality

Having ported bullet to native c#/xna I've had to become very familiar with a lot of the source code. It's very obvious that certain sections have been cobbled together from existing code libraries (even things like the use of different row order,column order matrices in different parts of the syste...
by xexuxjy
Mon Dec 30, 2013 7:12 pm
Forum: General Bullet Physics Support and Feedback
Topic: Is my code not cleaning-up properly all the btBoxShape alloc
Replies: 2
Views: 4683

Re: Is my code not cleaning-up properly all the btBoxShape a

couldn't see anything obvious, but I'm a bit puzzled why you're doing it the way you're doing it . You can add a different user pointer to each rigid body (CollisionObject) while they all share the same collision shape, so you could keep the existing demo implementation of a single shape. just set t...
by xexuxjy
Tue Dec 24, 2013 10:08 pm
Forum: General Bullet Physics Support and Feedback
Topic: Half of TriangeMeshShape missing
Replies: 3
Views: 3015

Re: Half of TriangeMeshShape missing

great! nice easy fix :)
by xexuxjy
Tue Dec 24, 2013 6:57 pm
Forum: General Bullet Physics Support and Feedback
Topic: Half of TriangeMeshShape missing
Replies: 3
Views: 3015

Re: Half of TriangeMeshShape missing

usual trick is to see if the debug draw system is showing the mesh as you'd expect it. other things to try : adjust your reader so that the x < 0 values are shift up and greater then zero ( I can't think of a reason why the -ve's would cause an issue but just in the spirit of debugging) , then adjus...
by xexuxjy
Thu Nov 28, 2013 3:09 pm
Forum: General Bullet Physics Support and Feedback
Topic: What does SetLinearVelocity represent in speed and time?
Replies: 1
Views: 3932

Re: What does SetLinearVelocity represent in speed and time?

should be m/s (based on the standard gravity values)
by xexuxjy
Thu Nov 28, 2013 12:08 pm
Forum: General Bullet Physics Support and Feedback
Topic: What can bullet return about collisions?
Replies: 3
Views: 6143

Re: What can bullet return about collisions?

Hi Pat, I'm pretty sure bullet will do all that you need - though using JBullet means that some of the newer things may not be available. in terrms of your questions - the various CollisionWorld raycast methods should return information about both contact point and contact normal so you should be ab...