The source for the project I made for my AMAZE Driving-Characters-in-PhysX Talk

edited in Tutorials

I gave a talk at AMAZE JHB on building characters in Unity and driving them with PhysX.

Like I said during the talk, as I navigated through the example project I'd built, there's loads of ways to configure joints and forces to produce gameplay, I was just showing off one way to do it.

That said, here's the Unity 5.4 project for anyone who's interested to paw through and meddle with and (hopefully) learn from. I had a request afterward for the source, and it seemed to a helpful thing to do.

As I said in the talk, a really useful tool is Candle Light's "Custom Handles", it's on the Asset Store for $15. It lets you much more easily visualize exactly what the constraints on the joints that you are applying will do, and allows some visual editing of constraints (which should always save you at least $15 of your time).


The project has a couple of scenes in it, as seen in the talk at A MAZE. The final scenes have two characters that can walk around in them, and there's a kind of faceplant jump that they can do. It's very simple, but hopefully it provides an idea of how a PhysX driven character might be constructed.

I'd of course be super stoked if anyone built upon this project (please show me if you do). There's a little bit of code in there that is common in Free Lives projects, but I presume everyone who contributed to it is happy for it to be reused. Please use this project in whatever way you wish.



  • Hmmm... I wonder how well 100 of these little guys would perform ;)
  • Awesome! Thanks so much Evan. I actually meant to ask if you were still planning on releasing this.

    I can't wait to play around with it! :D
  • Thanks for releasing this, the directory and file structure is very neat. :)
  • Hey Evan thanks for letting me steal your lighting setup :) Very nicely put scenes to see the differences!
  • edited
    Not nearly 100, but 26 characters fit in that ring alright:


    This would be a lot better of course if collisions with other characters knocked characters down (I mean if there was more interaction between them).
  • Was the talk recorded by any chance? Would love to watch it.
  • It was I think. Though based on previous A MAZE events, it takes a few months for them to go up.
  • Awesome thanks!
  • @vince Our recording camera was stolen, so no recordings this year :/.
  • Nooooooo! Haha it's cool thanks for letting me know. Playing around with the project and although a little unsure in places, I am finding my way around.
  • edited
    Stoked! Der_Kevin (on twitter) already made a small game with it!

    Thanked by 1blacksheepZA
  • Not nearly 100, but 26 characters fit in that ring alright:


    This would be a lot better of course if collisions with other characters knocked characters down (I mean if there was more interaction between them).
    It looks oddly satisfying...
  • jackshiels said:
    It looks oddly satisfying...
    That might not seem that odd when you consider an entire entertainment industry (American Wrestling) is built on big dudes jumping on top of other big dudes.
  • Thank you for doing this @EvanGreenwood , are there any slides from the event or on Goose Stepping ?
  • edited
    jackshiels said:
    It looks oddly satisfying...
    That might not seem that odd when you consider an entire entertainment industry (American Wrestling) is built on big dudes jumping on top of other big dudes.

    Still waiting to see a release of that minigame you showcased at EGE.
  • edited
    Super necro, but thanks a lot for this @EvanGreenwood! Made a quick prototype of physics based mech legs, although I'm not sure that is what it looks like :P


    p.s. Candle Light's "Custom Handles" is no longer around, but the latest Unity beta has built in support for showing joint restrictions.
  • Oh rad! That's a cool jiggly thing!

    That looks a lot like a plumbus btw image
    Thanked by 1notsimon207
  • Thank you. Going to do a magic trick with it today / tomorrow.
    Thanked by 1EvanGreenwood
  • Thanks for your lecture and sharing your knowledge with the gamedev community. Mr Evan, I am actually trying to make some mobile game based on your lecture. Hope you will like the final effect, please check the gif
    Thanked by 2roguecode konman
  • @dummy, this is awesome!
  • @roguecode thanks haha! It is a pure fun to create this small game :D
  • edited
    @Dummy Damn that's cool!! I love the post-apocalyptic fog and the background. The slow motion attacks are super stylish!

    I really hope you work on this further, it looks super rad!

    These cool uses of the talk/sourcecode make me want to do more talks like this :)
  • edited
    @EvanGreenwood here you can see some more action and some funny death at the end ;-) You inspired me to create some physic-based simple game and I am really glad to read that you like it. In the future I wish I could create such a fantastic and unique games as you do.
    EDIT: I forgot to add the special attack as well ;-)
  • That's super cool!

    Have you seen One Finger Death Punch? It does this type of gameplay super well. Love that the badguys all drop piles of cash... Planning on putting in upgrades?
  • I know One Finger DP, an awesome game. I am thinking about some small but fun upgrades like leaving a grenade after death, probably different weapons/skins/special attacks. Will share the beta and the release here for sure so you can test it :)
  • Looking forward to trying it out!

    Obviously share when you feel ready, but I'd point out that early feedback is useful and it's much easier to perfect something if you've tested it (i.e. being a perfectionist is only useful if you actually know what 'perfect' would be).

    Also, if the core of it is good it's easy to get people to try it again. If the core isn't good then spending lots of time tweaking the frills to 'perfection' won't be a good use of time.

    I'm saying this as a serial perfectionist :)

    Also, hope I'm not coming across as condescending, I don't know your level of experience.
  • @EvanGreenwood I know you're a busy guy but if you have any iPhone device and some time I would be really glad to send you the actual build, so you can check the feeling of the game. I am following you on the twitter (@tap_hero) so maybe chatting there about the test would be an option :-)
  • Can you do an Android build?
  • edited
    Unfortunately I am fighting with the optimisation.

    I have pretty good results on the iphone devices (I've reduced drawcalls by baking meshes and added some faked shadows). On the android still the physics is quite consuming. I am focused on the appstore at first, will try to fight for the next world-wide feature :)

    It is not possible for you to check it on the iOS?
  • I have one colleague with an iPhone... But as I understand it the process of getting a build onto an iPhone is a bit involved, it's not as simple as copying the build across. (I haven't done mobile game development in years :/ )
  • edited
    You're right, android is only sending the build file. In the iOS I need the UDID number of the iphone (it is visible in the iTunes, so you have to attach the mobile to the mac) and then I can add the device to my profile and create some adhoc build. Little bit more annoying but I got used to it.

    @EvanGreenwood if you would like something for the android, I can send you a really fun "sandbox" boxing I made with your character movement. It will be my next game for the mobile :-)
    EDIT: I've sent you the private message
  • @EvanGreenwood
    Thank you so much for the project, although I could not find a video recording of the talk, the project file helped me a lot.

    I used a lot of concepts that were in the project to build a prototype for a physics based fighting game. It uses control scheme similar to that of gang beasts, but the player can move each hands independently in any direction they want, so this allows the player to do various kinds of slams, throws, pull, push and fling after grabbing the opponent.

    I also added a climb system and a grapple hook system to the character controller, right now I am still exploring fun things that can be done with this character controller.

    I also made a game based on this character controller for Ludum Dare 40 game jam,
    Some Gifs of initial prototype page

    Once again thank you so much for sharing the project.
  • @richard141289 That's sooo freaking rad!

    Nice work as well on the characters. And I love that grabbing and punching. The punching in particular is really well "animated" :)

    Thanks for sharing your work. Are you thinking of going further with this project?
  • @EvanGreenwood Thank you so much. For punching animation, the wind up pose is done by setting the Target Rotation property of the configurable joints, and then I add force to the hand to punch.
    I will be going further with developing the character controller, by adding more animations, and experimenting with different types of movement, like swinging, wall crawling etc. as for games, I am currently working on a multiplayer fighting game like powerstone, using this character controller.
  • Stretch Armstrong!!! Sorry, had to :D

    I love the sort of Noby Noby Boy texture look of things. Looks so rad! Please keep going
  • @richard141289 oh hey! Didn't know this was a SA thing! I asked for a mac build on LD to no reply :) The system looks really cool, would love to give it a try :)
Sign In or Register to comment.