Cuestion about Character movement

RedSkull

09-03-2006 13:13:04

Hi, I have a problem related to the character movement:

Following the 'nxTutorial311' example I have created a scene where I desire to move me of form similar to a FPS. The problem is that the movement
is very, very, very small and only it happens whenever the movement key is pressed (if I maintain pressed the key does not continue moving).

The subject is that without using the Character object the camera moves normal, but when using it with him it happens the saying above.

I take something of time trying to solve it but I am already a little lost and I can't find the solution. If somebody knows some thing that could take
me to the solution (it can be that I am ignoring something and does not give to account) It would be great.

Thanks.

PD: By the way, great work with NxOgre.

betajaen

09-03-2006 13:18:39

There is a problem with how the character controller does move, which the speed is calculated by many things and the FPS rate of Ogre. Hence slowness or non-movement.

It does deserve a rewrite though.

But one thing before I blame it all on the code, does 311 tutorial work properly with you (except for the nasty jump bug)?

RedSkull

09-03-2006 15:56:08

The 311 Tutorial works me correctly.

Basically, the scene consists of a golf course by which you can be moved like in a FPS. The ground of golf course is a staticbody and surrounded
by a meshShape. The code to create the camera-character is equivalent to the tutorial. Apparently, the only different thing is the input buffer:
I use buffered input instead of unbuffered input (but using the same methods "mPlayer->move(character::<direction>)").

Some ideas that I consider:

- In my scene I use my own FrameListener (inherited of TutorialFrameListener) instead of 'tutorialFPS.h'. Lack something in my FrameListener that not
is in tutorialFPS.

- It is necessary to use some method of simulation like 'simulateWalking'.

- It is necessary something which update the phyxs system in frameStarted method.

betajaen

09-03-2006 16:01:14

I think it's because you're using bufferedInput, which is causing the character to walk "less" in a second than un-buffered would.

For now, I'd consider using un-buffered just for the character movement, until I rewrite the code.

RedSkull

09-03-2006 16:16:41

Ok, I'll prove with unbuffered input for now.

Thanks again.

RedSkull

22-03-2006 16:39:58

retaking this thread... I have obtained that the character moves normal (but or less), but, How is possible to get that it moves faster? I only have been able to get it modifying the source code of NxOgre.

betajaen

22-03-2006 21:44:06

retaking this thread... I have obtained that the character moves normal (but or less), but, How is possible to get that it moves faster? I only have been able to get it modifying the source code of NxOgre.

Unfortunately there are only three possibilities.

Easy way - set him to always run.

Harder way - Modify NxOgre like you have.

Even harder way - Wait until I add a walkSpeed/runSpeed thing in the character controller stuff.

RedSkull

23-03-2006 08:12:10

I am adding "get" and "set" methods for some "protected" variables like mMoveDirection, mMoveDirection_Locked and others.

Obvious, I do not know NxOgre in depth, reason why it would be breaking the integrity of wrapper making some accessible of those "protected" variables?

betajaen

23-03-2006 09:41:39

No that's all good, if you want to submit a patch with your new changes I'm more than willing to add to the source.