diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-14 23:34:06 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-14 23:34:06 +0400 |
commit | 41a0b56b704758e1e024b2e0df6b97e17f700ecd (patch) | |
tree | 35f62917a906f5f527f9f46c6ac369b3aa8fd649 /source/blender/blenloader/intern | |
parent | 7762100fcb84679348d4a01cc4aa0d9e52d3abc0 (diff) |
BGE patch: new Physics button and margin parameter in Logic panel. Change subversion.
The Physics button controls the creation of a physics representation
of the object when starting the game. If the button is not selected,
the object is a pure graphical object with no physics representation
and all the other physics buttons are hidden.
Selecting this button gives access to the usual physics buttons.
The physics button is enabled by default to match previous Blender
behavior.
The margin parameter allows to control the collision margin from
the UI. Previously, this parameter was only accessible through
Python. By default, the collision margin is set to 0.0 on static
objects and 0.06 on dynamic objects.
To maintain compatibility with older games, the collision margin
is set to 0.06 on all objects when loading older blend file.
Note about the collision algorithms in Bullet 2.71
--------------------------------------------------
Bullet 2.71 handles the collision margin differently than Bullet 2.53
(the previous Bullet version in Blender). The collision margin is
now kept "inside" the object for box, sphere and cylinder bound
shapes. This means that two objects bound to any of these shape will
come in close contact when colliding.
The static mesh, convex hull and cone shapes still have their
collision margin "outside" the object, which leaves a space of 1
or 2 times the collision margin between objects.
The situation with Bullet 2.53 was more complicated, generally
leading to more space between objects, except for box-box collisions.
This means that running a old game under Bullet 2.71 may cause
visual problems, especially if the objects are small. You can fix
these problems by changing some visual aspect of the objects:
center, shape, size, position of children, etc.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index da85a264a0c..fc863ff2f5e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7769,7 +7769,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) alphasort_version_246(fd, lib, me); } - if(main->versionfile <= 246 && main->subversionfile < 1){ + if(main->versionfile < 246 || (main->versionfile == 246 && main->subversionfile < 1)){ Object *ob; for(ob = main->object.first; ob; ob= ob->id.next) { if(ob->pd && (ob->pd->forcefield == PFIELD_WIND)) @@ -7777,6 +7777,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 2)){ + Object *ob; + for(ob = main->object.first; ob; ob= ob->id.next) { + ob->gameflag |= OB_PHYSICS; + ob->margin = 0.06; + } + } + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ |