HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: [1] 2 3

Author Topic: [Resolved] Shoulder Camera Examples (Code Provided)  (Read 16541 times)

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
[Resolved] Shoulder Camera Examples (Code Provided)
« on: Jul 19, 12, 05:22:11 PM »

Since I posted my videos ( playlist ) of my implementation of a shoulder camera, I've been getting requests for a tutorial and I've seen questions related to the subject here.

I haven't had time to engage in doing a formal tutorial.  So, I've decided to clean up my code a bit (read: remove the nasty looking commenting out of code tried and failed) and post my input_camera and game key binging ini here in the next couple of posts (which I'll do a quick reply to this post to reserve them).

From that others should be able to figure it out and, perhaps someone with more time than I have can create a tutorial while they implement things.  Also, I am rather new to HSL and there may be better ways to handle things.  I ask that if you use this but improve upon it, please post these improvements so that community can make use of it.  This comes down to basic implementations, not proprietary game code ; -)

Other notes:

  • I did the FPS camera tutorial from the wiki as well as implemented the advanced smoothing camera stickied in this board prior to implementing this camera so the code reflects that.
  • I merged the FPS camera with the camera inputs so that isn't separate.
  • I found that replacing the camera named "Game" fubars the FLYMODE camera.  I haven't fixed this yet.  It will be a matter of setting this as a camera of a different name like "OS_Cam" and having this load as default in the ACCController

Edit:

The files are posted now.  I hope you all find them useful.

Best, Shawn "DragonFist" Smith
« Last Edit: Sep 10, 12, 06:05:05 PM by HE-Cooper »
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: Shoulder Camera Examples
« Reply #1 on: Jul 19, 12, 05:22:34 PM »

GameKeyBindings.ini

// DefaultKeyBindings.ini
//
// format:
//
// [LayerName] = ClientScriptName
//   Command = [CTRL+ | ALT+ | SHIFT+]Key
//   Command
//
//  If no key is specified, the keyboard and mouse won't activate it and
//  players cannot assign shortcuts to it, but scripts can still call
//  GetCmdState and SetCmdState on it.
//
//  Combinations such as CTRL+SHIFT+A are not supported.
//
//  Commands are strings interpreted by the script.
//
////////////////////////////////////////////////////////////////////////////
//
// List of all key names:
//
// MOUSE.LEFT
// MOUSE.RIGHT
// MOUSE.MIDDLE
// MOUSE.4
// MOUSE.5
// A-Z
// 0-9        (on main keyboard area)
// NUM0-NUM9  (on the numeric keypad if numlock is engaged)
// NUM/       (on the numeric keypad)
// NUM*
// NUM-
// NUM+
// NUM.
// CLEAR      (num5 if numlock is not engaged)
// F1-F12
// `          (accent/tilde)
// -
// =
// [
// ]
// \          (backslash)
// /
// '          (singlequote)
// ;
// ,
// .
// TAB
// INSERT
// DELETE
// BACKSPACE
// CAPSLOCK
// UP
// DOWN
// LEFT
// RIGHT
// HOME
// END
// PAGEUP
// PAGEDOWN
// SPACE
// ENTER
// ESC
//
// JOYSTICK.1 through JOYSTICK.16 are joystick/gamepad buttons.
//
////////////////////////////////////////////////////////////////////////////


[Movement] = Input_Movement
  LeaveGameMode 
CTRL+`
  Forward = ANY+W
  Forward = ANY+UP
  AutoForward = ANY+BACKSPACE
  AutoForwardEngaged
  Walk = CTRL
  Sprint = SHIFT
  Backward = ANY+S
  Backward = ANY+DOWN
  Left = ANY+A
  Left = ANY+LEFT
  Right = ANY+D
  Right = ANY+RIGHT
  RotateLeft = ANY+Q
  RotateRight = ANY+E
  ToggleToolTips = CTRL+T
  LeftButton = ANY+MOUSE.LEFT
  RightButton = ANY+MOUSE.RIGHT
  MouseMovementEngaged
  Jump = ANY+SPACE
  Jump = JOYSTICK.2
  JumpingEngaged

[Camera] = Input_Camera
  DragRotateCameraEngaged
  ClearRotateCamera = ANY+MOUSE.5
  ToggleFullscreen = F12
  Click = MOUSE.LEFT
  ToggleAspectRatio = SHIFT+F12
  RotateCameraUp = ANY+R
  RotateCameraDown = ANY+F
  ZoomIn = NUM+
  ZoomOut = NUM-
  toggleCameraMode = -
  LeftShoulderMode = [
  RightShoulderMode = ]
  FirstPersonCameraEngaged
  OverShoulderCameraEngaged
  LeftShoulderModeEngaged
  RightShoulderModeEngaged
  VehicleCameraEngaged
  ToggleMouseLock = =
    
[Command] = Input_Command
  PlayMode = CTRL+G
  HotKey1 = ANY+MOUSE.LEFT
  HotKey2 = ANY+MOUSE.RIGHT
  HotKey3 = 1
  HotKey4 = 4
  HotKey5 = 5
  Chat = ENTER
  SlashChat = /
  ClearTarget = ESC
  NearestTarget = TAB
  //Command for showing the character activation counter window.
  OpenLoginCounterWindow = CTRL+L

[Mouse] = Input_Mouse
  LeftButton = MOUSE.LEFT
  RightButton = MOUSE.RIGHT
  MiddleButton = MOUSE.MIDDLE

[GUIEditor] = _Input_GUIEditor
  DeleteControl = DELETE
  CopyControl = CTRL+C
  CutControl = CTRL+X
  PasteControl = CTRL+V
  MoveLeftGrid = LEFT
  MoveRightGrid = RIGHT
  MoveUpGrid = UP
  MoveDownGrid = DOWN
  MoveLeft = CTRL+LEFT
  MoveRight = CTRL+RIGHT
  MoveUp = CTRL+UP
  MoveDown = CTRL+DOWN
  ResizeLeft = SHIFT+LEFT
  ResizeRight = SHIFT+RIGHT
  ResizeUp = SHIFT+UP
  SelectParent = ESC
  ResizeDown = SHIFT+DOWN
 
« Last Edit: Jul 19, 12, 05:28:27 PM by DragonFist »
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: Shoulder Camera Examples
« Reply #2 on: Jul 19, 12, 05:22:44 PM »

Input_Camera (a client-side script)

#define DEBUG
function OnMouseMove(mx as Integermy as Integerdx copies Integerdy copies Integer) as Boolean
  
#if DEBUG
  // println("Mouse Move - FirstPersonCameraEngaged = " + GetCmdState("Camera","FirstPersonCameraEngaged") + " - -OverShoulderCameraEngaged = " + GetCmdState("Camera","OverShoulderCameraEngaged"))
  #endif
  
if (GetCmdState("Camera","FirstPersonCameraEngaged")) and GetIgnoreCursor() == true
   
    cam 
as NodeRef GetActiveCamera()
    if (
GetTweakableBoolean("GameInvertMouseX")) or $INPUT._InputGameInvertMouseX
      dx 
dx * -1
    
.
    if (
not GetTweakableBoolean("GameInvertMouseY")) and ( not $INPUT._InputGameInvertMouseY )
      
dy dy * -1
    
.
    
fx as Float dx
    fy 
as Float dy * -1
 
    
if $INPUT._InputGameMouseSensitivity 0

      fx 
fx $INPUT._InputGameMouseSensitivity
      fy 
fy $INPUT._InputGameMouseSensitivity
    
.
   
    
    if 
cam is kindof ADV_LerpCamera
      cam
.ADV_DragRotateCamera(cam,fy,fx,0)
    else
      
RotateNode(cam,fy,fx,0)
    .

    return 
true  
  
else if (GetCmdState("Camera","OverShoulderCameraEngaged")) and GetIgnoreCursor() == true

    cam 
as NodeRef GetActiveCamera()
    if (
GetTweakableBoolean("GameInvertMouseX")) or $INPUT._InputGameInvertMouseX
      dx 
dx * -1
    
.
    if (
not GetTweakableBoolean("GameInvertMouseY")) and ( not $INPUT._InputGameInvertMouseY )
      
dy dy * -1
    
.
    
fx as Float dx
    fy 
as Float dy * -1
 
    
if $INPUT._InputGameMouseSensitivity 0

      fx 
fx $INPUT._InputGameMouseSensitivity
      fy 
fy $INPUT._InputGameMouseSensitivity
    
.
     
    
    if 
cam is kindof ADV_LerpCamera
      cam
.ADV_DragRotateCamera(cam,fy,fx,0)
    else
      
RotateNode(cam,fy,fx,0)
    .

    return 
true  
  
.

  return 
false
.


public function 
StartFP_Camera()
  
  
SetupFP_Camera()
.
public function 
StartOS_Camera()
  
  
SetupOS_Camera()
.

function 
SetupFP_Camera()
  
camera as NodeRef AddCamera("FP_Camera")
  if 
not (camera is kindof ADV_LerpCamera)
    
GlomClass"ADV_LerpCamera"camera )
  .
 
  
character as NodeRef GetPlayerCharacterNode()
  
character_position as Vector3
  GetNodePosition
charactercharacter_position )
 
  
SetCameraPosition"FP_Camera"character_position )
 
// character["Render"] = true
  
character["Render"] = false
 
  SetCameraFollow
"FP_Camera",character )
  
SetCameraOffset"FP_Camera"0.0 )
  if 
character <> None
      ACCController 
as NodeRef of Class _ACCController
      ro 
as Vector3
      
      where character is kindof _ACCControllerOwner
        ACCController 
character._getACCController()

        if 
ACCController <> None
          ro
.0
          ACCController
._setGameCameraRotationalOffset(ro)
        .
      .      
    .

  
FreeLook"FP_Camera"true )
  
ActivateCamera"FP_Camera")
  
SetCmdState("Camera","FirstPersonCameraEngaged",true)
  
SetCmdState("Camera","OverShoulderCameraEngaged",false)
  
//SetIgnoreCursor(true)
.

function 
SetupOS_Camera()
  
camera as NodeRef AddCamera("GAME")
  if 
not (camera is kindof ADV_LerpCamera)
    
GlomClass"ADV_LerpCamera"camera )
  .
 
  
character as NodeRef of Class HBNode GetPlayerCharacterNode()
  
character_position as Vector3
  GetNodePosition
charactercharacter_position )
  
//character_position.y = character_position.y + 5.0;
  
SetCameraPosition"GAME"character_position )
  
character["Render"] = true
//  character["Render"] = false
 
  
SetCameraFollow"GAME",character )
    
  
gco as Float GetCameraOffset("*")
    
    if (
gco 0.25)
      
gco 0.25
//    else if (gco < 0.06)
//      gco = 0.06
    
.
    
SetCameraOffset("*",gco)
  if (
getCMDState("Camera","LeftShoulderModeEngaged"))
    
hOffset as Float 0.45 
    SetHorizontalCenterOffset
("GAME"hOffset)
    
//character_position.z = character_position.z + 25.0
    //LookAt("GAME", character, character_position)
    
if character <> None
      ACCController 
as NodeRef of Class _ACCController
      ro 
as Vector3
      
      where character is kindof _ACCControllerOwner
        ACCController 
character._getACCController()

        if 
ACCController <> None
          ro
.22
          ACCController
._setGameCameraRotationalOffset(ro)
        .
      .      
    .
  else
    
hOffset as Float = -0.5 
    SetHorizontalCenterOffset
("GAME"hOffset)

    if 
character <> None
      ACCController 
as NodeRef of Class _ACCController
      ro 
as Vector3
      
      where character is kindof _ACCControllerOwner
        ACCController 
character._getACCController()

        if 
ACCController <> None
          ro
.= -22
          ACCController
._setGameCameraRotationalOffset(ro)
        .
      .      
    .
  
  .
  
 
  
  
FreeLook"GAME"false )
  
ActivateCamera"GAME")
  
SetCmdState("Camera","FirstPersonCameraEngaged",false)
  
SetCmdState("Camera","OverShoulderCameraEngaged",true)
 
.

function 
onmouseleaveviewport()
  
//println("Left viewport in FP_Camera")
.
 
public function 
FPS_ToggleMouseLock()
  
state as Boolean GetIgnoreCursor()
  
  
#if DEBUG
   
println("Toggleing cursor - state = " state)
  
#endif
  
  
if state == true
    SetIgnoreCursor
(false)
    
SetCursorVisibility(true)
    
    
#if DEBUG
      
println("Setting cursor to false")
    
#endif
  
else
    
SetIgnoreCursor(true)
    
SetCursorVisibility(false)
    
    
#if DEBUG
      
println("Setting cursor to true")
    
#endif
  
.
.

function 
OnMouseWheel(delta as Integer) as Boolean
// Used to determine the offset to use for the camera
//
  
as Float delta * -.0005
  gco 
as Float GetCameraOffset("*")
  
  
gco gco w
  
if (gco 0.25)
    
gco 0.25
//  else if (gco < 0.06 and gco > 0.0)
//    gco = 0.06
//  else if (gco <= 0.0)
//    gco = 0.0
  
.
  
cam as NodeRef getActiveCamera()
  
SetCameraOffset("*",gco)
  if ((
gco >= 0.06) and cam["CameraName"] != "GAME")
  
    
StartOS_Camera()
    
character as NodeRef GetPlayerCharacterNode()
    
    
character["Render"] = true
  
.
  
  if ((
gco 0.06) and cam["CameraName"] != "FP_Camera")
    
StartFP_Camera()
  
//  println("FirstPersonCameraEngaged = " + GetCmdState("Camera","FirstPersonCameraEngaged") + " - -OverShoulderCameraEngaged = " + GetCmdState("Camera","OverShoulderCameraEngaged"))
  
.
  return 
true
.

function 
onCmdStart(cmd as String) as Boolean
  
if (cmd=="DragRotate" or cmd=="DragRotateCamera")
    if 
GetCmdState("Camera""DragRotateCameraEngaged")
      
//SetCmdState("Camera","DragRotateCameraEngaged",false)
      
playerCharacter as NodeRef of Class HBNode GetPlayerCharacterNode()
      if 
playerCharacter <> None
        ACCController 
as NodeRef of Class _ACCController
        ro 
as Vector3
        
        where playerCharacter is kindof _ACCControllerOwner
          ACCController 
playercharacter._getACCController()
  
          if 
ACCController <> None
            ro
.ACCController._getGameCameraRotationalOffset().y
            ACCController
._clearGameCameraRotationalOffset()
          .
        .
        
        
cam as NodeRef GetActiveCamera()
        
RotateNode(cam,0,-ro.y,0)
      .
    .
    if 
$PLAYMODE._getPlayModeState() == ON
      
//$Cursor._setCustomCursorVisibility(false)
      
SetCursorVisibility(false)
    else
      
SetCursorVisibility(false)
    .
    
    
SetIgnoreCursor(true)
    return 
true
  
.
  if (
cmd=="ToggleFullscreen")
    
SYSTEM.EXEC.CPULIMIT 0:00:30
    NotifyStateChange
("TOGGLE_FULLSCREEN")
    return 
true
  
.
  if (
cmd=="ClearRotateCamera")
    
playerCharacter as NodeRef of Class HBNode GetPlayerCharacterNode()
    if 
playerCharacter <> None
      ACCController 
as NodeRef of Class _ACCController
      ro 
as Vector3
      
      where playerCharacter is kindof _ACCControllerOwner
        ACCController 
playercharacter._getACCController()

        if 
ACCController <> None
          ro
.ACCController._getGameCameraRotationalOffset().y
          ACCController
._clearGameCameraRotationalOffset()
        .
      .
      
      
cam as NodeRef GetActiveCamera()
      
RotateNode(cam,0,-ro.y,0)
    .
    return 
true
  
.
  if (
cmd=="ToggleAspectRatio")
    
NotifyStateChange("TOGGLE_ASPECTRATIO")
    return 
true
  
.
  if (
cmd=="RotateCameraUp" or cmd=="RotateCameraDown" or cmd=="ZoomIn" or cmd=="ZoomOut")
    return 
true
  
.
  if (
cmd=="toggleCameraMode")
    return 
false    
  
.
  if (
cmd=="LeftShoulderMode")
    return 
false    
  
.
  if (
cmd=="RightShoulderMode")
    return 
false    
  
.
  if (
cmd=="Click")
    return 
false    
  
.
  return 
false
.

function 
onCmdStop(cmd as String) as Boolean
  
if (cmd=="DragRotate" or cmd=="DragRotateCamera")
    
    if 
$PLAYMODE._getPlayModeState() == ON
      
//$Cursor._setCustomCursorVisibility(true)
      
SetCursorVisibility(true)
    else
      
SetCursorVisibility(true)
    .
    
SetIgnoreCursor(false)
    return 
true
  
.

  if (
cmd=="ToggleFullscreen" or cmd=="ClearRotateCamera" or cmd=="ToggleAspectRatio")
    return 
true
  
.
  
  if (
cmd=="RotateCameraUp" or cmd=="RotateCameraDown" or cmd=="ZoomIn" or cmd=="ZoomOut")
    return 
true
  
.
  
  if (
cmd=="Click")
    return 
false
  
.
  if (
cmd=="ToggleMouseLock")
    
FPS_ToggleMouseLock()
    return 
true
  
.
  if (
cmd=="LeftShoulderMode")
    
SetCmdState("Camera","LeftShoulderModeEngaged"true)
    
SetCmdState("Camera","RightShoulderModeEngaged"false)
    if 
GetCmdState("Camera""OverShoulderCameraEngaged")
      
StartOS_Camera()
    .
    return 
true
  
.
  if (
cmd=="RightShoulderMode")
    
SetCmdState("Camera","LeftShoulderModeEngaged"false)
    
SetCmdState("Camera","RightShoulderModeEngaged"true)
    if 
GetCmdState("Camera""OverShoulderCameraEngaged")
      
StartOS_Camera()
    .
    return 
true
  
.
    
  
println("command = " cmd)
  if (
cmd=="toggleCameraMode")
    
cam as NodeRef getActiveCamera()
   
    if (
cam["CameraName"] = "FP_Camera")
     
// DeactivateFP_CameraLayer()  
      
StartOS_Camera()
     
// println("FirstPersonCameraEngaged = " + GetCmdState("Camera","FirstPersonCameraEngaged") + " - -OverShoulderCameraEngaged = " + GetCmdState("Camera","OverShoulderCameraEngaged"))
    
.
    
    if (
cam["CameraName"] = "GAME")
      
StartFP_Camera()
    .
    
    return 
true
  
.
  return 
false
.

function 
onFrameUpdate(elap as TimeInterval)  
  if (
GetCmdState("Camera","RotateCameraUp"))
    
dX as Float .12 elap.millisecondsTotal
    cam 
as NodeRef GetActiveCamera()
    
RotateNode(cam,dX,0,0)
  else if (
GetCmdState("Camera","RotateCameraDown"))
    
dX as Float = -.12 elap.millisecondsTotal
    cam 
as NodeRef GetActiveCamera()
    
RotateNode(cam,dX,0,0)
  else if (
GetCmdState("Camera","ZoomIn"))
    
as Float elap.millisecondsTotal .0007
    gco 
as Float GetCameraOffset("*")
    
gco gco w
    
if (gco 0.25)
      
gco 0.25
//    else if (gco < 0.06)
//      gco = 0.06
    
.
    
SetCameraOffset("*",gco)
  else if (
GetCmdState("Camera","ZoomOut"))
    
as Float elap.millisecondsTotal .0007
    gco 
as Float GetCameraOffset("*")
    
gco gco w
    
if (gco 0.25)
      
gco 0.25
//    else if (gco < 0.06)
//      gco = 0.06
    
.
    
SetCameraOffset("*",gco)
  .
.
« Last Edit: Jul 19, 12, 05:39:09 PM by DragonFist »
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: Shoulder Camera Examples
« Reply #3 on: Jul 19, 12, 05:49:42 PM »

Updated with code from files.
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #4 on: Jul 20, 12, 01:17:24 AM »

Thanks for posting this.

I really like how it transitions from Fps<>Ots based on the camera offset
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Shoulder Camera Examples (Code Provided)
« Reply #5 on: Jul 20, 12, 05:37:31 AM »

For something like this, and probably other tutorials/code excerpts which will presumably live on for some time, it would be good to add this to the HeroWiki.  I know we can edit pages, and though I don't know if we can create new pages it may be possible.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Trixer

  • General Accounts
  • *
  • Posts: 26
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #6 on: Jul 20, 12, 08:37:36 AM »

For something like this, and probably other tutorials/code excerpts which will presumably live on for some time, it would be good to add this to the HeroWiki.  I know we can edit pages, and though I don't know if we can create new pages it may be possible.


I agree Scott,

I asked Dragon for this code a few days ago, cause we wanted to do something just like this for our game. He was kind of to hand it off to me and I want to offer a few notes in regards to it.

First off as it stands you have to implement the advanced camera tutorial on the wiki(even though clean engine already comes with it, as something like m_lerpCam or something.. I forget)

Implementation with the code provided, did not break my fly camera, it works just fine. (weird?)

I did stuggle with using the RB, to push my input.ini changes, however it was good to get it out of the way now, instead of later when my artists asks me how to upload a bunch of stuff ;)


All in all this is a great camera system, my team loves it and I really like the way he implemented it. Right or left shoulder was just taking the extra step to provide a really nice experience to the end user. 

My hats off to you Dragon!

*makes mental note to work on stealth tutorial this weekend, so that he can "provide" something too*
Logged
Lead Programmer and Technical Engineer for Harmonex Neuro Science Research Inc.

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #7 on: Jul 20, 12, 10:22:32 AM »

Depending on the date your HeroCloud world was setup, you might not have the advanced lerp camera implemented, as we don't push new scripts onto old worlds. So all worlds after x date have the advanced camera.
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #8 on: Jul 20, 12, 05:37:39 PM »

Depending on the date your HeroCloud world was setup, you might not have the advanced lerp camera implemented, as we don't push new scripts onto old worlds. So all worlds after x date have the advanced camera.

Does that mean we won't be getting this?
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #9 on: Jul 20, 12, 05:53:56 PM »

I'd suspect we'd get a similar wiki page with the code to implement.  I can understand not wanting to fubar some team's world by injecting code not tested in that environment.
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #10 on: Jul 20, 12, 06:00:14 PM »

With the Sapphire release, we'll be implementing package deploys, which will allow us to place large sections of script into your existing world. For systems like the foundation framework item and chat systems then your world will be updated to have all of the code and you'll choose if you want to "hook" into them.
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #11 on: Jul 20, 12, 06:29:59 PM »

With the Sapphire release, we'll be implementing package deploys, which will allow us to place large sections of script into your existing world. For systems like the foundation framework item and chat systems then your world will be updated to have all of the code and you'll choose if you want to "hook" into them.

Oh ok. I understand what you mean
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #12 on: Jul 20, 12, 06:57:32 PM »

Anyway, thanks for all the kind words.  I'm glad that this will be useful to those wishing to implement games with alternate cameras.

I'd, again, like to encourage others to contribute to taping out the basic needs of creating games (cameras, targeting systems, character selection, lobbies, etc.) so that we have a community as strong as UDK and others where one can easily find the "how-to's" game basics and focus more on the game than the learning curve.

If you find something that makes this camera set up more robust, post it here.  If you tape out character importing, post a tutorial or at least some clarifying notes in the forums or on the wiki.  And so on.  Let's make some games.
Logged

Triplelexx

  • World Owners
  • ****
  • Posts: 23
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #13 on: Aug 08, 12, 11:17:55 AM »

Thanks for the example it's a great help to me as I wanted to implement a very similar hybrid approach myself.

I have a problem though, the over shoulder cameras are working fine but when using the FP_Camera the player is not turning, the camera follows but the player is not orienting.

I've had a good look around but I'm kind of lost as to where the orientation of the player is set and to what has gone wrong.

I had to change the ADV_LerpCamera to E_LerpCamera, but that was about it.

Thanks again, very suitable for my needs,  just need to figure this problem out.
Logged

MageRage

  • World Owners
  • ****
  • Posts: 3
    • View Profile
Re: Shoulder Camera Examples (Code Provided)
« Reply #14 on: Aug 09, 12, 01:27:53 AM »

Thanks for the example it's a great help to me as I wanted to implement a very similar hybrid approach myself.

I have a problem though, the over shoulder cameras are working fine but when using the FP_Camera the player is not turning, the camera follows but the player is not orienting.

I've had a good look around but I'm kind of lost as to where the orientation of the player is set and to what has gone wrong.

I had to change the ADV_LerpCamera to E_LerpCamera, but that was about it.

Thanks again, very suitable for my needs,  just need to figure this problem out.

I had the exact same problem. No ADV_LerpCamera changed to E_LerpCamera however the player does not orient with the mouse looking. Any insight would be great. (i just tried the FPS tutorial http://wiki.heroengine.com/wiki/First_Person_Camera_Tutorial#FPS_Camera_Callback_Script_Source_Code and had the same problem with it).

I just signed up for HeroCloud last week and am on US Server 21.

Thanks for the tutorial and help.
Logged
Pages: [1] 2 3