Announcement

Collapse
No announcement yet.

Move object on touch?

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

    Move object on touch?

    So I would like to move KActors on touch, making physics based game. The UDN documentation of Object Picker says that Object Picker has FinalTouchObject property which can be exposed but I can't find it anywhere.

    Thanks in advance.

    #2
    PhysX does not work on iOS currently so even if you get it working on PC, it won't work when you transfer to the device.

    To expose a property, right click the event and choose the desired property from the 'Expose Property' submenu.

    Comment


      #3
      Not at all?

      It was not in the expose submenu but I got it sorted. So there is no physics at all? There has to be, how else the pawn could jump and such? Well if I make rigidbody cube, set it to be awake at level start, it wont fall down on iOS?

      Comment


        #4
        Normal unreal physics works, which handles player movement and such. PhysX does not work currently, which is for rigidbody, softbody, cloth, etc.

        Comment


          #5
          It was not in the expose submenu but I got it sorted
          Can you say how you exposed it? I want to use this input event so I can spawn an object where the player touches in the world... but can't figure out how to do it without uscript.

          Comment


            #6
            hey, im looking for the answer too, you know it now? i mean how to expose FinalTouchObject, there is only expose variable, but not expose property.

            pls help thx

            Comment


              #7
              The problem is, in mobile kismet reference its said, that the MobileObjectPicker has a property named FinalTouchObject, but i really cant find it. Do i miss something?

              Jeff Wilson, could you look at this please in kismet again?
              Because you mentioned it too, that we can expose that properties.

              But I think they are missing.

              Thanks!

              Comment


                #8
                I think I see the problem. The wording in the documentation isn't clear (I didn't actually write that specific part, though I should have double-checked it) and I assumed it meant one thing when it meant another. There are properties (FinalTouchLocation, FinalTouchNormal, and FinalTouchObject) that exist in the Object Picker script. They get set by the code, but they are not exposed in any way to use inside Kismet.

                I believe you would have to create a new class extending the Object Picker and create new variable links and hook them up to those properties in order to "expose" them.

                I'll fix the documentation to be more clear.

                Comment


                  #9
                  Originally posted by ffejnosliw View Post
                  I believe you would have to create a new class extending the Object Picker and create new variable links and hook them up to those properties in order to "expose" them.
                  Hmm - I'm no coder but I did try my hand at that, to the point where I had the extra variable links in kismet but they didn't seem to do anything. However I didn't subclass object picker, I just made a copy with a different name, so maybe that's why it didn't work. I'll give it a go.

                  EDIT: Yep, it works when it has the right parent class. However, even the Epic Mobile Object Picker event doesn't like having more than one target object. If you give it multiple objects, it only triggers when the first attached object is touched. Anyone know how to change that? (to be honest, I don't even want that functionality... I just want it to give me the world location when I touch the screen)
                  Code:
                  class SeqEvent_MobileTouchLocation extends SeqEvent_MobileObjectPicker
                  	native;
                  
                  defaultproperties
                  {
                  	ObjName="Mobile Touch Location"
                  	ObjCategory="Input"
                  	MaxTriggerCount=0
                  	TraceDistance=20480
                  	OutputLinks.Empty
                  	OutputLinks(0)=(LinkDesc="Success")
                  	OutputLinks(1)=(LinkDesc="Fail")
                  	VariableLinks.Empty
                  	VariableLinks(0)=(ExpectedType=class'SeqVar_Object',LinkDesc="Target",PropertyName=Targets)
                  	VariableLinks(1)=(ExpectedType=class'SeqVar_Vector',LinkDesc="TouchLoc",bWriteable=TRUE,PropertyName=FinalTouchLocation)
                  	VariableLinks(2)=(ExpectedType=class'SeqVar_Object',LinkDesc="TouchObj",bWriteable=TRUE,PropertyName=FinalTouchObject)
                  }

                  Comment


                    #10
                    Hello everybody,

                    I'm trying to implement the function to be able to move objects within the game but I have some difficulties.
                    I'm new to the unreal script so it might be the problem .

                    First of all I tried to copy in a Objectpicker.uc file the content of this page (the picking example)
                    http://udn.epicgames.com/Three/Mobil...king%20Example

                    and placed this file in this folder so it will compile
                    C:\UDK\UDK-2011-03\Development\Src\MobileGame

                    He doesn't want to compile with some error about the ITouchable class
                    I don't even now if the class already exist and if it is really necessary to implement it.

                    I tried to build a map with a mobileplaceablepawn like in your example but I can't see if I select the object or not. I don't know the command to see this debug function.


                    I also tried to do some trick with the objectpicker in kismet but I saw in another post on the forum that it wasn't fully implemented.

                    Any help would be really appreciated !

                    Comment


                      #11
                      this post might help you:

                      http://forums.epicgames.com/showthre...ght=itouchable

                      also the other day I was playing with the picker script and had to find a solution
                      search for Handleinputtouch and (if it is still a problem) that thread might help you too.

                      Comment

                      Working...
                      X