Announcement

Collapse
No announcement yet.

How to use joysticks in Unrealscript?

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

    How to use joysticks in Unrealscript?

    Hi all, I'm sure this is really simple but I just can't seem to get any results. I'd like to set up a KActor to be moved using the UberStickMoveZone, but I can't figure out how to actually pass the input to the KActor. So I've been able to use some code like this:

    Code:
    StaticMeshComponent.AddTorque(vect(0,0,TurnSpeed));
    to create a rotation, but I haven't been able to work out how to actually take in the input from the UberStickMoveZone.

    In MobilePC.uc I've added this code:
    Code:
    // Update the junker's movement direction
    function JunkerMove( float DeltaTime )
    {
    	if (Junker != None)
    	{
    		Junker.AxisInput(PlayerInput.aBaseX, PlayerInput.aBaseY);
    	}
    }
    I've tried a ton of combinations but I can't seem to wrap my head around what exactly is going on with the movement code; I'm having trouble understanding where the UberStickMoveZone actually tells the pawn to move I've really tried searching and haven't been able to work this out from any of the other posts I could find so any help is appreciated

    #2
    So I figured out the problem was that the MobilePC wasn't finding the KActor I'd set up, once I fixed that it's all working great

    Comment


      #3
      does this work allowing physics to stay active on the item you are moving around?

      I was trying to get a mobileplaceable pawn to retain (some skeletal mesh elements with) ragdoll physics while I moved it around, and couldn't get it going. I even tried added them on as a socket (like a weapon).

      if you have this working i'd be interested in how you got it setup.

      Comment


        #4
        I'm not sure if I'm understanding what you mean, but I tested using a KActor and a MobilePlaceablePawn for what I was working on and I ended up using a KActor for my purposes because it seems to allow easier physics control. So I'd imagine if you have a working ragdoll, maybe for what you're wanting to do you'd be better off moving it directly with these commands:

        http://wiki.beyondunreal.com/UE3:Pri...ions_%28UDK%29

        Comment

        Working...
        X