Search found 52 matches

by marios
Sun Feb 08, 2015 3:00 pm
Forum: General Bullet Physics Support and Feedback
Topic: How to manually change position of dynamic object
Replies: 5
Views: 3314

Re: How to manually change position of dynamic object

just use body->setWorldTransform() not motionstate->setWorldTransform(tf);
by marios
Tue Sep 09, 2014 9:02 pm
Forum: General Bullet Physics Support and Feedback
Topic: Multisphere getting sucked through ground
Replies: 5
Views: 3971

Re: Multisphere getting sucked through ground

I have never developed for mobile, but it is really too much to increase the number of triangles? Bullet itself is very fast(especially bvh mesh shape). I would try if doubling the triangle count helps - this is easy fix which helped me. I also remember that I also wanted to avoid increasing the tri...
by marios
Mon Sep 08, 2014 3:29 pm
Forum: General Bullet Physics Support and Feedback
Topic: Multisphere getting sucked through ground
Replies: 5
Views: 3971

Re: Multisphere getting sucked through ground

Your triangles are too big in my opinion. I also had this problem and the main character almost randomly get sucked through the ground in some places. What I have done is to load the mesh into blender and then add subdivide modifier( with simple option if you want too keep geometry the same or catmu...
by marios
Sat May 18, 2013 12:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: 11 FPS with 100 cubes
Replies: 5
Views: 2467

Re: 11 FPS with 100 cubes

Are you compiling your project on Release or Debug mode? Release is much faster
by marios
Wed Feb 27, 2013 10:28 am
Forum: General Bullet Physics Support and Feedback
Topic: Build error for static_cast of btCollisionObject*
Replies: 6
Views: 4633

Re: Build error for static_cast of btCollisionObject*

I think you just don't need casting, because getBody() in bullet 2.81 returns btCollisionObject* instead void* which was in previous bullet versions. So it should be just:

btCollisionObject* obA = contactManifold->getBody0();
or
const btCollisionObject* obA = contactManifold->getBody0();
by marios
Wed Dec 05, 2012 10:26 am
Forum: General Bullet Physics Support and Feedback
Topic: Inconsistent collision errors with 2D btBvhTriangleMeshShape
Replies: 10
Views: 7606

Re: Inconsistent collision errors with 2D btBvhTriangleMeshS

That's quite nice! So now you have 3 vertices representing two dimensional edge? am I right? So, every 2 vertices in 2d are represented by 3 vertices. It has still some redundancy but this isn't big problem. I will be afraid about something else. I mean that now your terrain is very thin and there m...
by marios
Tue Dec 04, 2012 11:05 am
Forum: General Bullet Physics Support and Feedback
Topic: Inconsistent collision errors with 2D btBvhTriangleMeshShape
Replies: 10
Views: 7606

Re: Inconsistent collision errors with 2D btBvhTriangleMeshS

You are totally right. I don't think that there is better way of doing that in current bullet version than convex 2d shapes. Actually, I see you are trying to do what I managed to do some time ago. http://www.youtube.com/watch?v=qKyUggLSw54 But the performance is really bad (that's why I don't use d...
by marios
Sat Dec 01, 2012 7:14 pm
Forum: General Bullet Physics Support and Feedback
Topic: Inconsistent collision errors with 2D btBvhTriangleMeshShape
Replies: 10
Views: 7606

Re: Inconsistent collision errors in btBvhTriangleMeshShape

If this is 2 dimensional triangle mesh(so all z coordinates are zero) i suggest creating convex hull for each triangle instead btBvhTriangleMeshShape. I was experimenting with 2d terrain some time ago and with mesh this didn't worked good. So I ended with primitives encapsulated with btConvex2dShape...
by marios
Sat Nov 24, 2012 2:38 pm
Forum: General Bullet Physics Support and Feedback
Topic: Strange behaviour of long rotating bodies
Replies: 10
Views: 4466

Re: Strange behaviour of long rotating bodies

Could you provide information about exact dimensions of cylinder shapes? Bullet is very bad in simulating shapes that are bigger than 10 units
by marios
Tue Sep 18, 2012 12:31 pm
Forum: General Bullet Physics Support and Feedback
Topic: how to delete new btConvex2dShape(new btBoxShape(v));
Replies: 2
Views: 1329

Re: how to delete new btConvex2dShape(new btBoxShape(v));

Here is my deletion code

Code: Select all

		
if(shape->isConvex2d() && shape->getShapeType()!=BOX_2D_SHAPE_PROXYTYPE)
{
	delete((btConvex2dShape*)shape)->getChildShape();
}
delete shape;
if you want 2d box shape you should use btBox2dShape instead packing btBoxShape into btConvex2dShape
by marios
Sun Aug 19, 2012 3:18 pm
Forum: Applications, Games, Demos or Movies using Bullet
Topic: GRIMIND - platform game
Replies: 2
Views: 3910

Re: GRIMIND - platform game

I created first gamplay trailer with lot of physics things. Check it out here
http://www.youtube.com/watch?v=tfjF_ku5K4M
by marios
Wed Aug 01, 2012 4:20 pm
Forum: General Bullet Physics Support and Feedback
Topic: Buoyancy and ApplyForce
Replies: 2
Views: 1641

Re: Buoyancy and ApplyForce

Is the rel_pos parameter of the ApplyForce function supposed to be expressed in the rigid body local transform or in world space? it's local transform I thought of adding a kind of linear (and maybe also angular) damping to the buoyant objects and wanted to know if it was a good idea or if better s...
by marios
Thu Jul 19, 2012 4:57 pm
Forum: General Bullet Physics Support and Feedback
Topic: Objects slowing down for no reason in zero gravity
Replies: 2
Views: 1904

Re: Objects slowing down for no reason in zero gravity

maybe it's object deactivvation (sleeping)
try

Code: Select all

body->setActivationState(DISABLE_DEACTIVATION);
when creating objects
by marios
Fri Jun 29, 2012 10:38 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Rigid Body Rotation
Replies: 4
Views: 4110

Re: Rigid Body Rotation

m_pCollisionShape->calculateLocalInertia(mass, btVector3(0.0f, 0.0f, 0.0f)); btRigidBody::btRigidBodyConstructionInfo rigidBodyCI(mass, m_pMotionState, m_pCollisionShape, btVector3(0.0f, 0.0f, 0.0f)); in this lines you got a bug, basicly you are passing zero vector as inertia and it should be vecto...
by marios
Sun Jun 03, 2012 2:03 am
Forum: Applications, Games, Demos or Movies using Bullet
Topic: GRIMIND - platform game
Replies: 2
Views: 3910

GRIMIND - platform game

Hello thanks for great physics library! I am making game called GRIMIND based on Bullet Physics. Currently contains only first chapter/level (about 20 minutes of gameplay) http://szamq.files.wordpress.com/2012/06/logo1trim.png?w=717&h=254 quick description: GRIMIND is a 2D physics based adventure, h...