Home Unreal Engine

UDK Mobile Controls

Hello there,

Forgive me for my ignorance, but I had a couple noob questions for UDK Mobile development. I've been researching a bit on how to touch an item in the game, as well as "swipe" it off of the screen. I found some information here on touching the screen:

http://udn.epicgames.com/Three/MobileKismetReference.html

But actually interacting with an object and "swiping" it off of the screen, as well as removing those knobs already on the screen, has proved to be a bit challenging. Signs seem to point towards coding which makes sense, but I'm not too sure as to where one would implement the code (noob coder as well).

If anyone had any information or links as to how to do this, I would greatly appreciate it. Just feel as if I've hit a wall here. Thank you in advance for your time.

Replies

  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    The knobs are in the code for that game type. You need to make your own empty game type. Messing with the install of another game type makes things not good. You can use UnCodeX to make things easier for a game type , then edit a couple of ini's and select the new gametype in the pulldown. You can start putting things back into your new gametype from UDK by sourcing scripts from the parents.

    In order to touch an object or swipe it off screen, requires physics, so any build since Jan will work. The only way I know is through code, but with Kismet, I think you can do it too.

    You need to get the initial touch, the end release, get the delta of that and the time/pixel offset to get the "speed".

    Kismet is fine, but if this is just a test, go ahead. If you want to go deeper, get into UC now.
  • jsleesper
    Options
    Offline / Send Message
    thanks lamont. we will try what you said :)
  • Insipidus
    Options
    Offline / Send Message
    Hey there Lamont. Sorry to bother you, but you mentioned that you knew how to do touch and swipe controls through code? I was wondering if you might be able to share this at all. I was looking on the UDK Mobile site and came across this information:

    http://udn.epicgames.com/Three/MobileInputSystem.html

    but I'm still having trouble implementing it for some reason. I think I've inputted everything correctly, but nothing seems to work. Any help would be greatly appreciated. Not sure if you'll even check this thread anymore tbh...

    Thanks in advance. Really appreciate it.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Right here.

    I'll set up a UDK file and send it over. How do you want it in Kismet or code?
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    oops, you said code. Hold on. Doing it now.
  • Insipidus
    Options
    Offline / Send Message
    I've begun to try kismet instead, just for prototyping, and now I cannot even get that to work.

    I am trying to do just a simple "up" swipe in the z-direction in UDK Mobile utilizing kismet. I've followed both examples given by ffejnosliw and m00t at this link on UDK's forums: (http://forums.epicgames.com/showthread.php?t=755220&page=2), and I cannot get the desired result.

    For ffejnosliw's example, I can get a swipe up, but the object also moves in the 'x' direction, seemingly due to the 'X Float' in the example, and it just stays in the air at it's final location. Gravity does not pull the object back down.

    For m00t's example, I cannot get anything to work at all. I've even incorporated the "down swipe" as well, just like in m00t's example, but nothing seems to work. Not sure why.

    The only differences that I have with each kismet setup are that I'm just extending from the "swipe up" node on Mobile Simple Swipes instead of every node in ffejnosliw's example and both the swipe up and swipe down nodes in m00t's example. I am also trying it with a mobile placeable pawn, but I've also tried with a static mesh, KActor, Mover, etc. and have had no luck.

    Finally, if you notice the Mobile Simple Swipes in March UDK Mobile has seemed to have lost a couple nodes. Not sure if there's something in there that I'm missing (you can right click to expose them). Oh, and I changed floats around to represent 'Z' instead of 'X', since that is the desired swipe direction, but that didn't seem to help much either.

    Curious if anyone else is having the issues I am? I am getting reads/comments on screen all the way through my kismet setups and I've tried to alter collision settings (BlockAll, TouchAll, etc.) as well. Maybe fresh eyes might see something I've missed or someone else has had success with the newest beta.

    Thanks in advance to anyone that might have some input.

    PS - Having trouble uploading screen shots of what I have here in Polycount for some reason. You can see them on UDK's forum through the link I provided above though. Shot_01 attachment is following ffejnosliw's example and Shot_02 attachment is following m00t's.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Post a picture of your kismet setup.
  • Insipidus
    Options
    Offline / Send Message
    For some reason I cannot upload images to Polycount. I continue to get errors. I meet both the file size requirements and H/W requirements, but no go. Switched to a diff browser as well, tried both jpgs and pngs, but nada.

    I linked to the UDK forum though, where the images can be viewed. Here is that link again:

    http://forums.epicgames.com/showthre...=755220&page=2

    Thank you.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Sorry, it's me and the kids today, so I didn't get to it till a few minutes ago. This should get you started. Just make sure you replace my KActor with one of your own. When you swipe up it will jump. Copy and paste this into Kismet.
    Begin Object Class=SeqVar_Object Name=SeqVar_Object_2
       ObjValue=KActor'KActor_0'
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1088
       ObjPosY=504
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Object_2"
       ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
    End Object
    Begin Object Class=SeqAct_SetVelocity Name=SeqAct_SetVelocity_3
       InputLinks(0)=(DrawY=386,OverrideDelta=11)
       OutputLinks(0)=(DrawY=386,OverrideDelta=11)
       VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_2'),DrawX=-1034,OverrideDelta=16)
       VariableLinks(1)=(LinkedVariables=(SeqVar_Vector'SeqVar_Vector_3'),DrawX=-970,OverrideDelta=76)
       VariableLinks(2)=(LinkedVariables=(SeqVar_Float'SeqVar_Float_1'),DrawX=-901,OverrideDelta=145)
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1072
       ObjPosY=352
       DrawWidth=214
       DrawHeight=77
       Name="SeqAct_SetVelocity_3"
       ObjectArchetype=SeqAct_SetVelocity'Engine.Default__SeqAct_SetVelocity'
    End Object
    Begin Object Class=SeqVar_Vector Name=SeqVar_Vector_3
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1000
       ObjPosY=768
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Vector_3"
       ObjectArchetype=SeqVar_Vector'Engine.Default__SeqVar_Vector'
    End Object
    Begin Object Class=SeqVar_Float Name=SeqVar_Float_1
       FloatValue=600.000000
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-872
       ObjPosY=576
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Float_1"
       ObjectArchetype=SeqVar_Float'Engine.Default__SeqVar_Float'
    End Object
    Begin Object Class=SeqEvent_LevelLoaded Name=SeqEvent_LevelLoaded_2
       MaxWidth=136
       OutputLinks(0)=(Links=((LinkedOp=SeqAct_MobileClearInputZones'SeqAct_MobileClearInputZones_0')),DrawY=901,OverrideDelta=14)
       OutputLinks(1)=(DrawY=922,OverrideDelta=35)
       OutputLinks(2)=(DrawY=943,OverrideDelta=56)
       ObjInstanceVersion=3
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1920
       ObjPosY=832
       DrawWidth=137
       Name="SeqEvent_LevelLoaded_2"
       ObjectArchetype=SeqEvent_LevelLoaded'Engine.Default__SeqEvent_LevelLoaded'
    End Object
    Begin Object Class=SeqAct_MobileClearInputZones Name=SeqAct_MobileClearInputZones_0
       InputLinks(0)=(DrawY=898,OverrideDelta=11)
       OutputLinks(0)=(DrawY=898,OverrideDelta=11)
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1736
       ObjPosY=864
       DrawWidth=128
       DrawHeight=45
       Name="SeqAct_MobileClearInputZones_0"
       ObjectArchetype=SeqAct_MobileClearInputZones'GameFramework.Default__SeqAct_MobileClearInputZones'
    End Object
    Begin Object Class=SeqVar_Float Name=SeqVar_Float_11
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1560
       ObjPosY=416
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Float_11"
       ObjectArchetype=SeqVar_Float'Engine.Default__SeqVar_Float'
    End Object
    Begin Object Class=SeqVar_Float Name=SeqVar_Float_17
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1640
       ObjPosY=424
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Float_17"
       ObjectArchetype=SeqVar_Float'Engine.Default__SeqVar_Float'
    End Object
    Begin Object Class=SeqVar_Float Name=SeqVar_Float_7
       FloatValue=500.000000
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-1464
       ObjPosY=416
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Float_7"
       ObjectArchetype=SeqVar_Float'Engine.Default__SeqVar_Float'
    End Object
    Begin Object Class=SeqEvent_MobileSwipe Name=SeqEvent_MobileSwipe_3
       Tolerance=50.000000
       MinDistance=10.000000
       MaxWidth=149
       OutputLinks(0)=(DrawY=445,OverrideDelta=14)
       OutputLinks(1)=(DrawY=467,OverrideDelta=36)
       OutputLinks(2)=(Links=((LinkedOp=SeqAct_SetVectorComponents'SeqAct_SetVectorComponents_0')),DrawY=489,OverrideDelta=58)
       OutputLinks(3)=(DrawY=511,OverrideDelta=80)
       VariableLinks(0)=(DrawX=-2038,OverrideDelta=36)
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=-2112
       ObjPosY=376
       DrawWidth=122
       DrawHeight=216
       Name="SeqEvent_MobileSwipe_3"
       ObjectArchetype=SeqEvent_MobileSwipe'GameFramework.Default__SeqEvent_MobileSwipe'
    End Object
    
    
  • Insipidus
    Options
    Offline / Send Message
    Thank you Lamont! I appreciate that.

    I pasted that script into Kismet though, and not everything showed up. All that is present is the "Mobile Simple Swipes" node, "Level Loaded" and "Clear Input Zones", 3 "Seq_Var Floats" (0, 0, and 500), and a "Set Velocity" node with your KActor attached, as well as a "Seq Var Vector" and a 600 "Seq Var Float". I'd attach a picture, but for whatever reason every time I attempt to, it says that the action fails. It might be due to the fact that I'm still new to this forum. Also, not sure if you're on March UDK too, but maybe that's why I didn't get everything with the past? Iduno.

    I was able to incorporate a simple button to make the object/character go up, as if they're jumping, but a swipe would definitely be ideal. I know you have your own stuff to do, so please don't trouble yourself too much with this. Thanks a ton for the time you've put in already. I really appreciate it. I'll keep at it and see if I can come up with something.

    Thanks again.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Yes, just make sure that it's a KActor and have it swipe to go up, then gravity will bring it back down.
  • Insipidus
    Options
    Offline / Send Message
    I will. Thank you :)
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    You can add me to gmail or MSN and we can go through your file like that.
Sign In or Register to comment.