Laughing_Gas
29-05-2008 12:40:41
Im trying to create a character but I cant figure out what the third parameter is supposed to be. It wants a
CharacterSystem::CharacterModel
But I cant figure out what that is supposed to be. Does it just want me to load a mesh or something?
betajaen
29-05-2008 13:27:35
There is no Character System in Bleeding yet. The code is just a framework for something I'm working on. If you need a Character you should use 0.9, or wait until I've finished '23.
But to answer your question and for the curious; The CharacterModel defines how and exactly the character moves and it's relationship to other movement models (walking, running, falling, etc.)
xadh00m
29-05-2008 13:44:26
Sounds interesting. I look forward to '23
Laughing_Gas
29-05-2008 14:09:07
so how would you suggest doing a character like object. My idea at the moment is to have an entity with raycasting for collision and do my own simple physics for him.
betajaen
29-05-2008 14:16:18
The Character System is the most quickest to setup, well tested and best solution at the moment. Otherwise if your calculating the physics yourself (for some reason) then a capsule will do.
Laughing_Gas
29-05-2008 14:25:18
The only thing i need physics on the character for is falling and I've done that a few times before so its no biggie.
Laughing_Gas
30-05-2008 15:22:49
Alright I've decided I'm going to use a body, so i got that in. The problem now is that the when the Character(a body) is standing on the ground(also bodies) he bumps up and down. It doesnt do it for a stack of blocks, so I'm not sutre why its doing it here. Ive frozen his POS_Z and ROT if that makes a difference.
Laughing_Gas
30-05-2008 15:27:42
Bah. It was the way i was moving him. I was using SetGlobalPosition which was cause issues. So new question! How do I move the character? The movement needs to be precise so I'm not sure that MoveTowards would work very good.
Laughing_Gas
30-05-2008 15:46:21
I figured it out. SetGlobalPosition is fine, I was just mooving it up a bit for a test that i forgot to take out. I think I should start a thread where I just ask questions and solve them myself.
betajaen
30-05-2008 15:57:58
setGlobalPosition will play havoc on the solver if you use it all the time.
Adding Forces/Torque is the safest, otherwise you will have to make actor kinematic and use the moveGlobalPosition/orientation methods. But at that point you may as well use the Character system.
Laughing_Gas
31-05-2008 12:47:37
How can I change the gravity for one Actor? It needs to flip back and forth a few times throughout the game so i thought i could set the mass to -10 but that didnt seem to do anything. Any Ideas?
betajaen
31-05-2008 13:12:46
Gravity is a global thing. You and I do not fall to the Earth at different rates of acceleration do we? It's the same with PhysX.
Laughing_Gas
31-05-2008 14:23:14
yeah yeah i saw the thread with the video link you posted. But shouldn't an object with a megative mass have gravity reversed? Is it even possible to have a negative mass? If not, how can i reverse gravity for a single object?
betajaen
31-05-2008 14:26:31
You can turn it off. Raise a body flag with NX_BF_DISABLE_GRAVITY
Laughing_Gas
31-05-2008 14:52:36
Yeah i saw that one but thats not quite what I need. I think im gonna just have to mess around with some things.
rafa.gdev
01-06-2008 03:34:22
Hi everyone, I'll take this thread to post an issue that I have, in the character system. It's a very, very weird thing, I don't know what's going on, maybe someone can help me: I'm using the character system (nxOgre version 0.9). It works finely, on debug mode. However, in release mode it doesn't work. The code compiles, everything else works (bodies, gravity etc), but the character does not work. I'll show some code to expose more the problem:
if ( mKeyboard->isKeyDown(OIS::KC_Y) )
{
mCharacter->addMovement(Character::DR_Forward);
}
if ( mKeyboard->isKeyDown(OIS::KC_H) )
{
mCharacter->addMovement(Character::DR_Backward);
}
In release mode, this code does nothing. The character if not affected by gravity, and does not respond to the event, although it is rendered.
Even weird: when I run the program in release mode, but with debug information, it works, without debug information, none.
Someone help, please!
Thanks!
Laughing_Gas
02-06-2008 01:55:14
I just need to confirm two things before i start the main part of my game.
1) Is it possible to pass an actor from one scene to another? I didnt think it would be, but I found
mScene->_unregisterActor()
and
mScene->_registerActor()
And it sounded like those could be it, but I wasnt sure.
2) Can objects from two different scenes interact with each other? Im almost sure they can't, but if there was a way to get them to interact that would be awesome.
Laughing_Gas
02-06-2008 07:19:38
Alright I Confirmed number 2 is true, so I dont really need an answer to either. It would be cool if anyone had an idea about how I could switch gravity for an object without taking it out of the scene.