Search Results

Saturday, September 17, 2011

BGHelper V1.6 - Node Map PathFinding and Soft-body Pinning

Photobucket
Hey. So today, I'm giving out BGHelper V1.6. This version includes quick and simple NodeMap-based pathfinding, along with a soft-body pinning function.



Basically, a NodeMap is a map of nodes - each node can connect to all other nodes (that it has a clear shot to), and a path is created from these connections. Rather than using A* pathfinding, it's easier and faster to place nodes down (before or even during gameplay) and navigate using them to move about the world.

I also added and fixed some other things; a soft-body pinning function has been added (SoftBodyPin). There's no example, but it's pretty simple - you simply run the function with the first argument being the soft-body object you want to pin, and the second being a list of control objects. All of the vertices in the control objects will be used to pin the soft-body object, so be aware of that. It could look like this:

controls = [c for c in sce.objects if 'softbodycontrol' in c.name] # Create a list of control objects that have 'softbodycontrol' in their names

SoftBodyPin(obj['mesh'], controls)

I learned about the technique for pinning from an example that a Spanish student that experimented with soft-body pinning some time ago (I don't want to get his name wrong, heh). The video can be found here.

Anyway, download BGHelper V1.6 here!

Mirror 1: MediaFire
Mirror 2: FreeDrive

5 comments:

  1. is there any documentation for the module or is it all in the various posts. Looking for how to use the mouse look portion and if it will work with 2.6

    ReplyDelete
  2. Unfortunately, I haven't developed any documentation apart from the comments and strings in some of the functions explaining them. Fortunately, there's example files for a lot of the features, and using the MouseLook function is very simple (and should work with 2.6). It's as simple as this to get a working mouse-look system:

    import BGHelper

    BGHelper.MouseLook()

    That's it! You can add some arguments into the function to change how it behaves. I really should add some documentation...

    ReplyDelete
  3. Oh, and the example file (there's only one, my mistake, but it includes separate scenes for different demonstrations) is included with the library. Simply place the library next to the blend file you want to use it with, or place it in the Blender Foundation folder, for Windows.

    ReplyDelete
  4. Thx for the continuous update of the bghelper, its been really usefull ;)

    ReplyDelete
  5. Your BGE resources are awesome! Keep it up!

    ReplyDelete