Search found 225 matches

by xexuxjy
Tue May 19, 2015 1:19 pm
Forum: General Bullet Physics Support and Feedback
Topic: Dynamic and static rigid bodies not colliding
Replies: 5
Views: 7362

Re: Dynamic and static rigid bodies not colliding

It's possible that the static objects have reached a sleeping state , you can try disabling sleeping on them in your PhysicsComponent as below. The default debug draw class also shades objects by activation state which may help show up errors. if(mass == 0.0f) { body_->setActivationState(DISABLE_DEA...
by xexuxjy
Mon May 18, 2015 1:46 pm
Forum: General Bullet Physics Support and Feedback
Topic: Java port of Bullet
Replies: 125
Views: 1179653

Re: Java port of Bullet

Out of interest, which version of JBullet are you using? If you're building from the github one (https://github.com/bubblecloud/jbullet) I can probably submit a patch to enabled the setLinear/Angular Factor code in case it's helpful in the future
by xexuxjy
Fri May 15, 2015 3:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: Java port of Bullet
Replies: 125
Views: 1179653

Re: Java port of Bullet

Looks like the standard JBullet predates the linearFactor calls, shouldn't be a big deal to add them in though...
by xexuxjy
Fri May 15, 2015 1:43 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet performance problems - quite huge scene
Replies: 12
Views: 11206

Re: Bullet performance problems - quite huge scene

May be a dumb question, but are you using a debug or release build of bullet for you testing?
by xexuxjy
Fri May 15, 2015 10:20 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Temporary attack hitboxes
Replies: 11
Views: 12605

Re: Temporary attack hitboxes

Memories a bit flakey on this but : You set-up a single btGhostPairCallback (only once) to allow the broad-phase to pass on the results of it's collision tests to the ghost objects directly. The ghost objects are a bit different in that they remember the colliding pairs (rather than just having the ...
by xexuxjy
Thu May 14, 2015 2:02 pm
Forum: General Bullet Physics Support and Feedback
Topic: How do i completely clean bullet?
Replies: 5
Views: 4913

Re: How do i completely clean bullet?

Yes that's one option, or you could extend btDiscreteDynamicsWorld and update with a 'cleanup' method, though if you do that you'd have to be very careful with any objects that had been created before that point as they would no longer be valid
by xexuxjy
Thu May 14, 2015 12:46 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Temporary attack hitboxes
Replies: 11
Views: 12605

Re: Temporary attack hitboxes

Hmm, tricky to see from that. But I couldn't see anything obviously wrong.
Would you expect the sphere to intersect the floor based on it's size and the offset from the player you're generating it at? How far away from the wall do you have to be before it stops generating 'false' collisions?
by xexuxjy
Thu May 14, 2015 12:38 pm
Forum: General Bullet Physics Support and Feedback
Topic: How do i completely clean bullet?
Replies: 5
Views: 4913

Re: How do i completely clean bullet?

What the demos do is to keep a list(s) of all the shapes,bodies, constraints etc that you create and just go through and tidy those up at the end.
you'd have to do that (or similar ) in your own code
by xexuxjy
Thu May 14, 2015 12:24 pm
Forum: General Bullet Physics Support and Feedback
Topic: How do you delete a joint?
Replies: 6
Views: 5915

Re: How do you delete a joint?

Not directly, though it would be easy enough to add such a method to btDiscreteDynamicsWorld, or to expose it's constraints list if you wanted to :

btDiscreteDynamicsWorld.h

btAlignedObjectArray<btTypedConstraint*> m_constraints;
by xexuxjy
Tue May 12, 2015 3:53 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to multiply a btVector3 value?
Replies: 2
Views: 3276

Re: How to multiply a btVector3 value?

btVector3.h
SIMD_FORCE_INLINE btVector3& operator*=(const btScalar& s)
{
...
}

so should just be able to multiply it as you've written your example:

btVector3 val(1.0f,1.0f.1.0f);
val *= 2.2f;
by xexuxjy
Sat Apr 18, 2015 11:42 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Temporary attack hitboxes
Replies: 11
Views: 12605

Re: Temporary attack hitboxes

Probably best thing to use is ghost collision objects as you don't really want them to effect the physics of the world. If you look at the ghost demo you'll see an example, including how you might use a collision callback or similar. You can use the callback to trigger situations in your game . e.g....
by xexuxjy
Thu Apr 09, 2015 1:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: btHeightfieldTerrainShape has wrong heights
Replies: 2
Views: 4167

Re: btHeightfieldTerrainShape has wrong heights

Seems reasonable, are the errors consistent, i.e. do you always see the same pattern of incorrect height values or does it vary? does changing the resolution of your heightmap alter things at all?
by xexuxjy
Wed Jan 28, 2015 10:00 am
Forum: General Bullet Physics Support and Feedback
Topic: Collision masks once again...
Replies: 6
Views: 8330

Re: Collision masks once again...

You can step in with JBullet, just depending on which version you're using you may have to update your ide to run the instrumentation on the stackalloc created objects
by xexuxjy
Tue Jan 27, 2015 4:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 21015

Re: What type of Collision Shape are better for Terrain?

And finally I stop being dim and remember that Java doesn't support ref types like c# , ho hum.
Anyone the attached jar and source jar has a working HeightfieldShape and a version of the TerrainDemo you can use as a reference. Or you could stick with your triangle mesh shape :)
by xexuxjy
Fri Jan 23, 2015 1:02 pm
Forum: General Bullet Physics Support and Feedback
Topic: What type of Collision Shape are better for Terrain?
Replies: 17
Views: 21015

Re: What type of Collision Shape are better for Terrain?

well I'm stumped at the moment I'm afraid. Height map works 'inconsistently' unless all all the height values are the same, i.e. it's flat. Mesh renders correctly in debug draw and normals for surfaces seem correct just most of the time things fall through the world anyway. Changing collision shape ...