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

How To: Kismet Flashlight (follows vertical rotation)

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

  • How To: Kismet Flashlight (follows vertical rotation)

    This tutorial is now up on UDK Central
    -> http://udkc.info/index.php?title=Tut...met_flashlight


    This one had me stumped for a while when I started UDK a few months ago, and I've seen a lot a questions asking about how to do this, so here is how I had eventually figured out how to set it up.

    Start by adding a light to your level, convert it to a movable spotlight, and adjust the cone angle to better resemble that of a flashlight.



    Next, open up a kismet window, and create the following nodes.

    New Event > Level Loaded
    New Action > Actor > Get Location and Rotation
    New Action > Actor > Set Actor Location

    Link those nodes the same way I have pictured below.



    That 0.00 delay is a 0.001 which creates a loop, and determines how frequently the location and rotation of the player is updated. This is what allows for a smooth sync between flashlight and player.

    That is all it takes, hopefully this helps somebody


  • #2
    Wow, nice job! it works well, but can i suggest some improvements?
    I was thinking that would be cool to attach to the light a static mesh with volumetric light, to add a volume light effect to the torch, i think it will be very cool.
    I'm trying to do it now but i'm not very good, i think you can only attach a material to a light, by adding a function.
    BTW, a cool light volumetric static mesh is "S_UN_Volumetrics_ExpensiveLightBeam_01" in the "un volumetrics" package.
    If you can find a way to attach it to the torch, let me know !

    Ah, and a button to turn off and on would be cool too.

    Sorry for my english and thank you very much.

    Comment


    • #3
      does this work for the june version as well? because atm it only crashes if i set it up like you did and press PIE

      Comment


      • #4
        Maybe someone could try checking "bRenderLightShafts" ..

        Comment


        • #5
          From what I know RenderLightShafts do not render when you're in the back of the light source. Am I right?

          Comment


          • #6
            Originally posted by Kaldrick View Post
            From what I know RenderLightShafts do not render when you're in the back of the light source. Am I right?
            I think it will render, but it will look borked.

            The lightshafts aren't actually real, in a sense that they're always calculated.. You have to look at the sorce for them to be calculated.

            (Would be cool if you could force them to always render, meaning static-mesh light-shafts would be rendered obsolete.. Fine, it would be more computationally demanding, but still.. Would be cool to have that ability

            Comment


            • #7
              Originally posted by HavocInferno View Post
              does this work for the june version as well? because atm it only crashes if i set it up like you did and press PIE
              I've only tried this in July and August, where it works in the PIE. I'm unsure of compatibility with older versions.

              Comment


              • #8
                Does this crash for anyone else when the player dies?

                Comment


                • #9
                  @Fritz117 yea it does for me

                  Comment


                  • #10
                    Awesome, I've been looking for a few days on how to do this. Thanks man!

                    Comment


                    • #11
                      Ok, so I have it working, but it crashes UDK whenever you die XD
                      I'll have to make it harder to die in thie game then.
                      Still, thanks for the help!

                      Comment


                      • #12
                        very nooby question but how do i get that node connecting to Rotation vector?

                        -The UnicornKidd

                        Comment


                        • #13
                          A student I've been helping has been using this setup with good results up until the Novemeber build, but now the flashlight's rotation won't change, only it's location. I can't see anything in the release notes that would cause this setup to stop the flashlights rotation from changing.

                          Any ideas?

                          Edit: Fixed

                          Comment


                          • #14
                            I was planning to try this out, what cravat am I looking to avoid?

                            Comment


                            • #15
                              It now needs outputting from the 'Rotation' node instead of the 'Rotation Vector' node, like so:

                              Comment

                              Working...
                              X