Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Key Binding Troubles

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Key Binding Troubles

    Hey Guys,
    Im trying to toggle between 2 cameras,
    First person and third person (shoulder view).

    i have set bindings in the the defaultinput.ini

    Code:
    .Bindings=(Name="GBA_ChangeCamera",Command="ChangeCamera")
    is in the
    ;-----------------------------------------------------------------------------------------
    ; BINDINGS USED TO ORGANIZE ALL GAME BINDABLE ACTIONS IN ONE PLACE FOR SYSTEMS SUCH AS UI
    ; GBA - GAME BINDABLE ACTION
    ; "_Gamepad" - IS USED WHEN A CONTROLLER IS USING AN ALTERED MAPPING FOR AN ACTION
    ;-----------------------------------------------------------------------------------------

    Part of defaultinput.ini

    and

    Code:
    .Bindings=(Name="M",Command="GBA_ChangeCamera")
    in the

    ;-----------------------------------------------------------------------------------------
    ; Game Keyboard/Mouse Bindings
    ;-----------------------------------------------------------------------------------------

    part of defaultinput.ini

    Now this is where im having the problem, how do i put it into coding, i take it that i would need to put the code in my aZkorpPlayerController.uc class (aZkorp being my Custom Folder)

    i want it to swap between 3rd and 1st person view when i press "m"
    if in third person it goes to first person, if its in 1st person it goes to third person.

    Any help would be greatly appreciated.
    Thanks,
    aZzy

  • #2
    That key binding is going to call an exec function "ChangeCamera" which needs to be provided in your PlayerController.

    Switching cameras could be as simple as flipping a boolean, or dynamically loading a new camera archetype (via DynamicLoadObject) . There are lots of ways you could set it up, such as the exec function taking the camera class name.

    I would probably implement both cameras independently. Get the game working with one, then get it working with the other (there are lots of camera examples out there). Each camera will extend the base Camera class etc. (see the camera guide as well - http://udn.epicgames.com/Three/Camer...icalGuide.html)

    Flipping between them should then be easy.

    Comment


    • #3
      That link was very helpful, thankyou mate.

      aZzy

      Comment


      • #4
        [Unresolved] Key Binding Camera Troubles, Plz help!!

        Hey,

        The cameras worked fine, but i am wondering why i cant move the crosshair up or down.. also there is no cross hair.

        I am trying my hardest to learn Unreal Script but there is somethings i just cant get to work,

        Key Bindings, so when i press "m" it will toggle between 3rd person and 1st person. by that i mean if it is in 3rd person it will go to 1st person and if its in 3rd person it will go to 1st person.

        Making the cross hair accurate when in any other view other then 1st person and lastly

        making the cross hair visible =P

        any help on this would be greatly appreciated.

        Thanks guys
        aZzy.

        Comment

        Working...
        X