[Bf-committers] BGE Proposal: "Character" physics object type
denisw at online.de
Tue Aug 23 10:33:08 CEST 2011
This is the first time I am trying to get in touch with the Blender
developer community, so please forgive me if this is the wrong
communication channel for the following proposal. Also, let me tell you
that I really love Blender, and would like to thank everyone who has
contributed to it and made it what it is! You're my heroes. :)
I recently investigated the Blender Game Engine for a hobby game project
- a 2.5D platformer - and as a first exercise, I tried to get basic
player character movement going. I expected this to be fairly easy to
do, but I found out that it is actually pretty difficult to get right.
The reason is that none of the currently available physics object types
in the game engine are really appropriate for this task. "Dynamic" is
the closest match, but leads to several weird problems due to doing more
sophisticated physics simulation than is actually needed - you see
effects such as the player character sliding a bit after releasing a
movement key, or bouncing when hitting the ground after jump or walking
into walls. Playing around with physics and material settings (mass,
friction etc.) reduce these issues, but don't completely remove them; it
all still feels unsatisfactory and not very professional.
The point is that for this use case, there are actually no "real"
physics needed at all; applying gravity and doing collision detection
would actually be enough, and much more desirable as it provides the
precision that the sophisticated physics types lack. In addition, such
an implementation would be much more efficient.
Unfortunately, such a solution would currently have to be implemented
manually by writing a Python script which applies gravity and handles
collisions manually. This is a shame, because I believe that the need
for such behavior is very, very common - almost every first-person
shooter and platform game uses such reduced physics for player
characters and enemies, for instance - and should not have to be
implemented by every game developer needing it individually. Also, the
current situation is frustrating for newcomers: about the first thing
almost any beginner will try to do is to make some kind of object move
like in an FPS / jump'n'run game, and being confronted with weird
bouncing and sliding behavior in these first steps is not exactly
Therefore, I propose the addition of a new physics object type named
"Character" which applies the described basic means of physics to the
object. This would provide BGE users with a simple way to get player
character movement working as expected. Its implementation could use
Bullet's "kinematic character controller" , which is exactly meant
for this use case and has useful parameters such as step height (so that
the character can walk over small steps, such as stairs, automatically).
What do you think?
More information about the Bf-committers