Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Jul 21, 2008 8:40 pm 
Offline

Joined: Tue Apr 15, 2008 4:14 pm
Posts: 17
I have a sphere in a frictionless world that continuously has new forces applied to it (to push it around in different directions). These forces build, and eventually the collision detection fails and the sphere passes completely out of the model it is contained in. Is there a good way to cap the linear velocity on a collidable object. Also, does anyone have any suggestions on ways to keep the sphere inside the model at high speeds (the model is an enclosed mesh)?


Top
 Profile  
 
PostPosted: Tue Jul 22, 2008 1:58 am 
Offline

Joined: Tue Oct 30, 2007 9:23 pm
Posts: 146
http://chunkyks.com/bulletthings.pdf

Quote:
Is there a good way to cap the linear velocity on a collidable object.

I described how to cap the speed of an object in that doc.

Quote:
Also, does anyone have any suggestions on ways to keep the sphere inside the model at high speeds (the model is an enclosed mesh)?

I did describe one way to do that in my doc, too, although it can get a little compute-intensive at very high speeds [basically, decrease the fixedTimeStep parameter to stepSimulation and increase maxSubSteps to compensate].

Alternatively, use continuous collision detection. There's a CCD example, and several threads on these forums talking about it.

Gary (-;


Top
 Profile  
 
PostPosted: Tue Jul 22, 2008 5:24 am 
Offline

Joined: Fri May 30, 2008 2:51 am
Posts: 508
Location: Ossining, New York
what kind of collision shape defines the boundary of your world? If it is convex you could use lots of btStaticPlaneShape objects.

I think tunneling occurs more easily with trimesh collision shapes than simple primitives like boxes, spheres, planes, etc


Top
 Profile  
 
PostPosted: Tue Jul 22, 2008 10:32 am 
Offline

Joined: Sat Feb 16, 2008 5:12 pm
Posts: 8
Did you try to set the linear / angular damping of your rigid body. It doesn't exactly cap the velocity, but since the damping is dependent on the velocity the end result usually means speed capping, but in a more "realistic" way. Of course, your object will eventually grind to a halt, which you may not want...


Top
 Profile  
 
PostPosted: Wed Jul 23, 2008 2:33 am 
Offline

Joined: Tue Oct 30, 2007 9:23 pm
Posts: 146
I did. The problem is that either the terminal velocity [since that's effectively what you've implemented] is either really high, or my spaceship's damping is way too strong.

Perhaps it'll work if I change the mechanic to be highly damped instead of a more asteroids-like feel, but I *like* the asteroids-like feel :-)

Gary (-;


Top
 Profile  
 
PostPosted: Thu Jul 24, 2008 4:10 am 
Offline

Joined: Tue Apr 15, 2008 4:14 pm
Posts: 17
I haven't had a chance to read through the document yet, but thanks for the link. I hope to look through it soon and post a bit about my experience.

To answer a couple questions that were brought up, we are using a basic tri mesh which is basically a lot of complex tubular structures. We thought about trying to build this out of simpler objects, but that doesn't easily allow for model complexity we would need. I think it would work better if our spheres weren't inside of the collision mesh, but we haven't come up with a decent way to do this either.

Someone brought up dampening. I've played around with that both in this context, and because sometimes we need to slow these spheres down. It doesn't work well to solve this problem. In the end it just delays the inevitable, and it also requires you to either apply a lot of force initially to get the spheres moving as fast as they need to or you have to scale the damping up over time. But since apply force is cumulative, it merely delays the inevitable.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group