About Store Forum Documentation Contact



Post Reply 
Disable automatic character head roll/pitch
Author Message
monotonic Offline
Member

Post: #1
Disable automatic character head roll/pitch
Hi All,

I'm just in the process of implementing characters in my game, I'm currently using the Game::Chr class as a base. I'm finding myself fighting with it a bit, I'm trying to use my own custom animations and I tried removing the call to updateAnimations and doing this myself but then the characater controller doesn't move at all (physically move - custom animations are fine). This issue is something that I can work through when I get chance to study the game object classes code.

Anyway, back on topic, in order to disable to automatic roll/pitch of the charcaters upper torso when turning I have to set the sac.body and sac.head to -1 in my custom create function. Is there a better way of doing this, as this method seems very hacky?

Also, I'm thinking that maybe I should ditch the charcater controller altogether and create my own, is this advisable or should I just hack away until I get it right? What are you guys doing?
09-02-2014 10:23 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Disable automatic character head roll/pitch
You can check the source code of Game.Chr, it's included as one of the items in license downloads.
The rotation of the torso I think is somewhere in 'animate' function.
You can perhaps just comment that out.
It all depends on what kind of game you're working on, right now I'm doing a dungeon crawler for which I don't need a complex character movement/animation class, so I'm not using Game.Chr for that.
09-02-2014 12:39 PM
Find all posts by this user Quote this message in a reply
monotonic Offline
Member

Post: #3
RE: Disable automatic character head roll/pitch
(09-02-2014 12:39 PM)Esenthel Wrote:  You can check the source code of Game.Chr, it's included as one of the items in license downloads.
The rotation of the torso I think is somewhere in 'animate' function.
You can perhaps just comment that out.
It all depends on what kind of game you're working on, right now I'm doing a dungeon crawler for which I don't need a complex character movement/animation class, so I'm not using Game.Chr for that.

Hi,

Thanks for the response. I'm just looking through the source for the Chr class now, that's where I found the way of disabling the automatic torso leaning code. I noticed that it checks if the head and body bones have been found before executing the lean code, so making them appear as though they haven't been found disables it.

I don't need anything advanced either to be honest, this would be ideal for another game I'm looking to make in the future, but for now all I need is basic movement and jumping. I might create a completely new character class that is not as advanced and use that instead.

Thanks for the help, it is appreciated.
09-02-2014 12:49 PM
Find all posts by this user Quote this message in a reply
Post Reply