# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Pushing objects away due to explosionsPosted: Thu Oct 27, 2011 3:01 am

Joined: Wed Nov 11, 2009 9:09 pm
Posts: 29
Curious:

I want objects to be "blown away" due to a nearby explosion. Is there something like this included? Sort of a reverse gravity?

Or should I do apply linear force and apply angular force to objects within the blast radius to simulate this myself?

thanks

Top

 Post subject: Re: Pushing objects away due to explosionsPosted: Thu Oct 27, 2011 4:24 am

Joined: Tue Jun 29, 2010 10:27 pm
Posts: 237
You would need to do this yourself. One common way would be to create a ghost sphere representing the blast, and iterate over all objects inside it an apply forces correspondingly, perhaps based on the distance from the centre of the sphere (the blast origin). This is a "simple" approach. To get fancier, you could perhaps do something like casting a ray from the blast origin to one or more points (such as the centre or bounding box corners) on each object in the blast radius to determine if that object is "visible" to the blast, and not shielded behind something else (in which case you might not want to apply any forces). You could also use the distance of the raycast hits from the blast origin - and their local position on the object - to apply varying forces across an object (which would result in linear+angular velocity).

Top

 Post subject: Re: Pushing objects away due to explosionsPosted: Thu Oct 27, 2011 1:09 pm

Joined: Wed Nov 11, 2009 9:09 pm
Posts: 29
thanks!

Top

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

 All times are UTC

#### Who is online

Users browsing this forum: Bing [Bot] and 4 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