Third Person Shooter Movement Example File

How would this armature be applied to a new mesh
without deformations ?

I’ve gotten a report from a user that the file can’t be downloaded. It works for me, but being the person that uploaded it I don’t think that’s a very relevant test. Would someone else mind trying to download it to see if it’s working? Thanks!

It worked fine for me.

Same here, works fine

Having trouble dissecting the components to make the file though…

I’ve not actually looked at the file since the last update (I’m horrible at keeping up with projects) but I’m sure it got pretty messy by that point. I’m also noticing that I somehow missed all the comments that it’s crashing when it goes to aim mode now, I guess I should probably revisit the file and get it working again and see about cleaning it up a bit. Maybe I should look at KCroxtonJr’s changes too.

@dancreator, are you having difficulty with components of the script, or the character rig itself?

Looks like resident evil 4/5. it’s nice. I like it!:slight_smile:

Hi, I’m using a modified rigify skeleton for my character (using the ORG bones instead of the DEF bones, cause they provide a friendly structure and give less bones).

How would I apply this script of yours to my rig?

What I’m doing so far is trying to copy all the control bones from your rig to mine and repeat the setup, is this the only way?

Your rig seems to have a scale to it, and the origin point is not on the ground which is a no no with modern day game rigs. If I have a different oirign point for the rig will I encounter problems?

Hi! I wanted to ask if you could post an example with just character, laser, all animation, but not background elements. Also, all the names of objects(charRig, charCollisionBox etc.). I just need this system for my game and I want to have easy file from which to apped all I need without thinking what is what- what do I need, but what- don’t!

Hey! Sorry about the lack of response, I’ve been away. I didn’t see it crash when I checked the file back in September, but maybe it’s a computer-specific bug or something that happens in specific situations.

It’s been a while since I touched this file so I’m not sure I remember all the details, but you should be able to scale the armature and move the origin as you please (since I’m pretty sure I made it all driven by animations, and not directly setting bone positions). I’ve not seen a consensus on where the origin should be in a rig. I’ll have to take a look at the file again and double-check if this is the case.

I’ve set a reminder to make a culled-down file when I get home, although if you want to integrate it into a game you might want to modify the script to work with other systems like a keybinding system and whatnot.

[edit] okay, I’ve looked at the file a bit, and you can indeed basically set up the armature however you please- the only bones referenced by the script are for placing the feet onto a slope and to be honest, that part is pretty buggy and needs a rewrite anyways. The rest of the interactions between the script and the armature are through actions. To apply it to a custom armature you will need to create custom animations, but it should work just fine- just keep in mind that some of the animations are supposed to override other animations on certain bones (EG the aiming animation should be able to play over the walk/run animations without interfering with the legs) so be careful about setting keyframes on bones that will be used by other animations. I used an “aim” bone that is the parent of the hand IK controllers, to guarantee that the gun will always be pointed in the right direction even if the torso bones animate. Probably not the best solution but it’s what I came up with. Animations that the script references are:

Walk_Forwards
Walk_Backwards
Walk_Left
Walk_Right
Run_Forwards
Run_Backwards
Run_Left
Run_Right
LookL
LookR
AimL
AimR
Fire
Idle

The L and R versions of aim and fire are identical but with the bone that the camera follows over the other shoulder. Again, there’s probably a better solution to that one.
The slope matching looks for Foot_R and Foot_L bones, which are intended to be the parents of the IK targets for the legs, they’ll be raised or lowered to meet a slope (min and max values, as well as the names of the bones are on line 84) but other than those bones, you don’t actually need the same control bones (although I designed it with IK arms and legs in mind, so it might take some finagling to get it working with FK limbs). The particular IK setup I used is just the one I’m most comfortable with though, the important thing is just being able to place the hands and feet in specific locations and the arms and legs being able to connect naturally.

LASTLY it looks like there’s some bugs in there that a more recent version of Blender has introduced, I can make a trimmed version with the bugs present if you like but I don’t know if I’ll have time to fix those bugs until monday or so.

when do you think you will be updating this

Hi! Thanks for the reply!

The problem I had was that it seems your entire animation is IK driven, and the same IK bones that drive the animation are also used by the script, hence there’s no conflict.

In my case I have premade animations where the IK, all the constriants and such are baked (from the rigify skeleton) onto a simpler skeleton (which would also be the case if I used mocap animations), and If I set the IK’s that are needed by your script the new IK completely overrides the animations I have :(.

can someone please send a working copy of this file with the current version of blender or 2.75a

I took a look back through the file, and I gotta be honest, I don’t think I’ve got it in me to bring it up to the latest version of Blender. Something’s changed about the animation system in Blender or how it’s referenced in Python (I haven’t been keeping up with the last few releases) and while it’s easy enough to get the crashes out of the script (you just add a line that says “import bge” to the beginning of the Control script) the animations no longer blend correctly (which is to say, at all) and I don’t think I have the time or wherewithal to figure out what’s going on. It may just be a single command that’s changed or it may be that the whole system needs a rewrite.

I think it’s a bug. This setup works pretty good using the UPBGE fork (after adding ‘import bge’ of course)

This template does not work for version 2.76 and later… :no:

This does not work for version 2.76 and later…

This does not work for version 2.76 and later…

Now works good using the UPBGE fork, after adding “import bge” in “Control” script.

Attachments

TPS Walk Rig 0.0.61.blend (1.74 MB)

1 Like

Working with 2.79.

Great 3rd person template!

hello and thank you

i downloaded the file and i opened it but there’s no motion of my character, i know the problem is mine but i don’t know what it is, i appreciate if you advice me.