Game Development Community

Making Kork Yaw by keyboard moveMap.bind

by Infinitum3D · in Torque Game Engine · 08/06/2008 (9:48 am) · 3 replies

I want to use the keyboard to turn the Player model left and right, rather than by mouse. A and D strafe, so I want Q and E to turn.

I tried the obvious first.

moveMap.bind( keyboard, q, turnLeft );

since turnLeft is already defined in default.bind.cs

Didn't work. And function yaw(%val) uses getMouseAdjustAmount.

Then I tried editing the function turnLeft by changing the KeyboardTurnSpeed : 0 to KeyboardTurnSpeed : 1

Didn't work.

KeyboardTurnSpeed : 100 didn't work either.

Any suggestions. I know it can be done because the WoW Style resource does it. Do I need an advanced camera resource or engine change? I was hoping for a simple script mod...

Hmmm.. The WoW uses a schedule and a Start/Stop script...

I'll see if that works... Any other suggestions?

Thanks,
Tony

#1
08/06/2008 (11:01 am)
Couldn't get a schedule to help me any.

Instead, I've also tried changing my turnLeft function to $mvYawRightSpeed = %val * $movementSpeed;

but no help. I guess turning (yawing) is different than moving.

I see where static F32 mYawLeftSpeed; is public in class MoveManager in moveManager.h along with mForwardAction; mBackwardAction; etc.etc. and moveManager.h is #included in player.cc, but since I'm not a programmer, I guess I'm having trouble with the syntax for my script function turnLeft.

I don't really understand the whole turnLeft function. What does this mean?

? $Pref::Input::KeyboardTurnSpeed : 0;

Thanks!

Tony
#2
08/06/2008 (2:22 pm)
It works. Make sure you delete the config.cs file EVERY time you make a change to default.bind.cs.
#3
08/06/2008 (2:33 pm)
@Erik- It works? What works?

I tried a dozen things, when did I get it right?

Only I could get it right and still screw it up somehow!

Tony

btw- thanks for the tip Erik. I forgot about config.cs