Announcement

Collapse
No announcement yet.

Kismet Camera Nodes (.UC Download Link) Video Link Too!

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

    Kismet Camera Nodes (.UC Download Link) Video Link Too!

    Hello again!

    Got a pet project of Super Mario Galaxy GamePlay Clone to be released to the community just to prove I can do it all in Kismet with node extensions. Not that I don't like unreal scripting so much I just dig visual scripting wiring up networks that work is a sensation not just a text file.

    So here is a Kismet LootAt Node and a Chase Camera Node:

    CameraLookAt - A Node that looks calculates Pitch Yaw Roll of vector
    Shown in the first part of the video along with a sequence that is included for lol
    Download LookAt Node

    Code:
    /**
     * KisMet LootAt
     * \Development\Src\Engine\Classes\CameraLookAt.uc 
    */
    class CameraLookAt extends SequenceAction;
     
    var Vector PawnPos;
    var Vector CamPos;
    var Vector UpVector;
    var Vector RotatedVector;
     
    function  Activated()
    {
     RotatedVector=Vector(Rotator(Normal(PawnPos - CamPos)));   
    }
     
     
    defaultproperties
    {
     bCallHandler=false
     
     ObjColor=(R=255,G=0,B=255,A=255)
     ObjName="CameraLookAt"
            ObjCategory="Camera"
     
     VariableLinks.Empty
     VariableLinks(0)=(ExpectedType=class'SeqVar_Vector',LinkDesc="PawnPos",PropertyName=PawnPos)
     VariableLinks(1)=(ExpectedType=class'SeqVar_Vector',LinkDesc="CamPos",PropertyName=CamPos)
     VariableLinks(2)=(ExpectedType=class'SeqVar_Vector',LinkDesc="UpVector",PropertyName=UpVector)
     VariableLinks(3)=(ExpectedType=class'SeqVar_Vector',LinkDesc="RotatedVector",bWriteable=TRUE,PropertyName=RotatedVector)
     
    }

    ChaseCameraBasic - A node that calculates Location(xyz) and Rotation(Pitch Yaw Roll) of a camera following a pawn. The way its set up it could be used on any actor not just player or camera.
    Download ChaseCameraBasic Node

    Code:
    /**
     * KisMet Chase Camera Basic = NonSmoothed.
     * \Development\Src\Engine\Classes\ChaseCamerBasic.uc 
    */
    class ChaseCamerBasic extends SequenceAction;
     
    var Vector PawnPos;
    var Vector OldPawnPos;
    var Vector CamPos;
    var Vector LocationVector;
    var Vector RotateVector;
    var float FollowDistance;
    var float FollowHeight;
     
    function  Activated()
    {
     Local Vector CamToPawnVector;
     Local Vector ScaleVector;
     Local float Distance;
     Local float FollowSpeed;
     
     //Step 1: Calculate Location(Postion) Vector
     CamToPawnVector = CamPos - PawnPos;
     Distance = VSize(CamToPawnVector);
     
     if(Distance > FollowDistance) 
     { 
      FollowSpeed = VSize(OldPawnPos - PawnPos);
      ScaleVector = Normal(CamToPawnVector) * FollowSpeed;
      LocationVector = CamPos - ScaleVector;
     }
     else
     {
      LocationVector = CamPos;
     }
     
     //Step 2: Protect The Height 
     if(LocationVector.z < (PawnPos.z + FollowHeight)) 
     {
      LocationVector.z = PawnPos.z + FollowHeight;
     }
     
     //Step 3: Calculate Pitch Yaw Roll Vector
     RotateVector=Vector(Rotator(Normal(PawnPos - LocationVector))); 
     
    }
     
     
    defaultproperties
    {
     bCallHandler=false
     
     ObjColor=(R=255,G=0,B=255,A=255)
     ObjName="ChaseCameraBasic"
        ObjCategory="Camera"
     
     VariableLinks.Empty
     VariableLinks(0)=(ExpectedType=class'SeqVar_Vector',LinkDesc="PawnPos",PropertyName=PawnPos)
     VariableLinks(1)=(ExpectedType=class'SeqVar_Vector',LinkDesc="OldPawnPos",PropertyName=OldPawnPos)
     VariableLinks(2)=(ExpectedType=class'SeqVar_Vector',LinkDesc="CamPos",PropertyName=CamPos)
     
     VariableLinks(3)=(ExpectedType=class'SeqVar_Float',LinkDesc="FollowDistance",PropertyName=FollowDistance)
     VariableLinks(4)=(ExpectedType=class'SeqVar_Float',LinkDesc="FollowHeight",PropertyName=FollowHeight)
     
     VariableLinks(5)=(ExpectedType=class'SeqVar_Vector',LinkDesc="LocationVector",bWriteable=TRUE,PropertyName=LocationVector)
     VariableLinks(6)=(ExpectedType=class'SeqVar_Vector',LinkDesc="RotateVector",bWriteable=TRUE,PropertyName=RotateVector)
     
    }

    [shot]http://www.bitSlap.me/ChaseCameraBasicFinal.png[/shot]
    [shot]http://www.bitSlap.me/TiggerSetup.png[/shot]


    The reason I called it Basic because of a few things:

    1) No smoothing code
    2) Z Height Clamp is jerky needs dampening
    3) No object/world avoidance
    4) Have to modify weapons code for new firring vector but I think there is a fix on the forums for that.

    I am dropping the code in your hands if you want to extend it, my main project is picking up steam so I am going to have to get to work on it for now but I will continue on my pet project regularly as relief from getting burnt out.

    Here is the video:

    Map by JekaXP
    Character by JohNLA
    Missing textures by me! lol "me bad"

    Youtube HD



    Hope you find use for it guys.
    Omega

    #2
    Wow Omega, many thanks. Just what I have been looking for. WOOT -

    Comment


      #3
      CoolCool all worth it now!

      Comment


        #4
        this is awesome! way to go omega!

        Comment


          #5
          Better Video in Game Environment

          Found out that the Z Height Clamp was working fine and using Simple line collision on polysoup without a collision volume causes a vibrating pawn when going up ramps. Using blocking volumes like the Deck causes smooth collisions.

          Comment


            #6
            Hi,
            I'm playing with UDK for a few weeks and I'm far from mastering all the tools in it. I dowloaded and installed the chase camera node and made the stuff in kismet as indicated in the first screenshot but it doesn't work.
            I'm almost sure it's because I don't understand what's happening in the second screenshot. Seems to be a trigger volume. But what am I supposed to do with it?
            Any help appreciated. Thanks.

            Comment


              #7
              How to apply the code? Is it pasteable in Kismet or some UDK textfile?

              Comment


                #8
                After setting up the kismet sequence, all I get is a stationary camera at 0,0,0... I have an almost identical sequence (except for the player set to the ??? var of course!). I also do not understand how (or why) the pawn variable is linked to the middle of the trigger volume. It seems that using the set actor location node causes this to happen to the camera, even if I only hook up rotation... I'm fairly new with kismet so it might be something simple I am looking over. Any ideas?

                Comment


                  #9
                  (except for the player set to the ??? var of course!)

                  GetLocationandRotation seems to need a Actor, Player Object or PlayerSpawned's instagators are NON Actor or vise versa because the triggers instagator is what worked. I seen in the forums a post about getting the actual XYZ-YPR of the proper class.

                  Comment


                    #10
                    I'm wondering...

                    Seems to work like a charm! Couple of issues that I'm wondering about though.

                    1. Movement is a little awkward ( I think this is my problem though )
                    2. When you die, the player respawns at the latest checkpoint, however the camera is always oriented in the direction that the player was when they died. It moves back after you walk forward a bit, but is there anyway to set it back to it's initial location upon death? I assume it could be done in kismet, but I'm not sure how. (example: if I fall down a hole and die, I respawn with a birds-eye view of the player).

                    Any quick fixes?

                    Comment


                      #11
                      You could try:

                      1A) The Direction of the spawn player and the camera need to be by default pointing the same direction

                      2A) Use the same setup and then with the player spawned event link it directly in to the chase camera node. Set PlayerSpaned.MaxTriggerCount 0

                      Comment


                        #12
                        Hmm, none of that seemed to work for me. Except for #1, which I did anyway. I'm just trying to get the camera to reset to it's 'placed' location upon respawn.

                        Also, part of what I meant by the controls... currently, if I'm going around a corner, there is no good way to adjust my view so that I can see things. Do you have any functionality for rotating the camera around the player? Such as if I bound two keys to rotate left and right (think Mario 64).

                        Comment


                          #13
                          How do we use these pieces of code? I tired pasting them in Kismet but nothing is created.

                          I must be missing something simple?

                          Thanks

                          Comment


                            #14
                            Photos & Videos are remove please upload
                            Thank

                            Comment


                              #15
                              Has anybody got the original images and/or videos of this? Or can anybody please explain how to set it up.
                              Thanks,
                              Oli

                              Comment

                              Working...
                              X