Move Object without applying force, but still do collision detection

rated by 0 users
This post has 3 Replies | 3 Followers

Top 200 Contributor
Posts 15
SunBurn_Community_Licensee
Workerbe Posted: 04-11-2012 11:48 AM

I am not sure if this will make sense, and i am hoping someone can help me with this.

 

I am trying to build a sort of 3D puzzle game. One of the things i would like to do is grab objects in the world and move them, then place them to activate parts of the puzzle.

 

The issue i am running into is that when i grab an object and move it with translation that it doesn't catch the physics (aka collisions) but if i try to do it by applying force it doesn't feel natural in how it moves compared to the character. Anyone have any suggestions?

Top 25 Contributor
Posts 304
SunBurn_Community_Licensee

If you haven't checked it out already, it's worth downloading the latest BEPUphysics source code.

http://bepuphysics.codeplex.com/SourceControl/list/changesets

In their solution they have a demo project that has a grabber class for picking entities up, dropping them, or throwing them.  It has a very similar feel to the way you pick up items in the previous two Fallout games, so it's pretty solid (and you can adjust the settings if you need to).

Nate

Top 200 Contributor
Posts 15
SunBurn_Community_Licensee

I am wondering if the Indie Freaks Game Framework has this class. I will look into it. Thanks.

 

Top 10 Contributor
Posts 1,289
SunBurn_Community_Licensee
SunBurn_Contributor
SunBurn_Pro_Licensee

Hi Workerbe,

The Indiefreaks Game Framework has all the classes released with BEPUPhysics and you can basically replicate any samples provided with it with small changes.

If you use any of the EntityCollisionMove inherited classes (BoxCollisionMove, SphereCollisionMove, etc...), you can access the BEPU Entity equivalent calling its Entity property. The BEPU Space instance is also available using BEPUPhysicsManager.Space property.

As you can see, IGF's Physics assembly just wraps around BEPU in a grey box approach letting you still manage all its internals by yourself.
Note however that you'll have to learn more about BEPUPhysics in order to get it running properly and that it may have some side effects to IGF's implementation so you should go one step after another to understand what may happen wrong at some point ;)

Page 1 of 1 (4 items) | RSS