# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 6 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: simulating maximum velocityPosted: Mon Jul 21, 2008 8:40 pm

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

 Post subject: Re: simulating maximum velocityPosted: Tue Jul 22, 2008 1:58 am

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

 Post subject: Re: simulating maximum velocityPosted: Tue Jul 22, 2008 5:24 am

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

 Post subject: Re: simulating maximum velocityPosted: Tue Jul 22, 2008 10:32 am

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

 Post subject: Re: simulating maximum velocityPosted: Wed Jul 23, 2008 2:33 am

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

 Post subject: Re: simulating maximum velocityPosted: Thu Jul 24, 2008 4:10 am

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 6 posts ]

 All times are UTC

#### Who is online

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

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities