[ut2004] Are there inbuilt functions to actually turn left and right?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Parser

Hello
May 7, 2002
1,531
0
0
120
England baby!
fraghouse.beyondunreal.com
I'm just mucking about with some code here, and as you know UT2004's method of "turning" involves rotating the camera's view axis left and right. What I'd like to know is if there are any stock functions I can use to make the player turn left and right properly like in a platform game.

For example, in Tomb Raider Legend, you can move the camera freely while the directional keys move the player separately. What I'm trying to achieve is the same effect using the Playercontroller's behindview and freecamera features, but currently the directional keys for Left/Right rotate the camera and not the player. I'd imagine it would be perfectly possible to code in functions to rotate the player as needed, but I was wondering if there was anything native that could do the job better.

Cheers!
 

_Lynx

Strategic Military Services
Staff member
Dec 5, 2003
1,965
8
38
41
Moscow, Russia
beyondunreal.com
I guess you need to look at how the camera is caused to rotate when turning the character with behindview 1 and freecamera 0 and override that in the subclass to rotate only character.
 

Hazard.ep

New Member
Oct 7, 2003
166
0
0
Take a look at UpdateRotation() in the PlayerController:
Code:
            ViewRotation.Yaw += 32.0 * DeltaTime * aTurn;
            ViewRotation.Pitch += 32.0 * DeltaTime * aLookUp;

ATurn and aLookUp are the variables that have input from the mouse or keyboard to turn the player around.