Results 1 to 3 of 3
  1. #1

    Question Pick Actor - Cannot find pawn spawned from PlayerStart

    Hello I'm new to UDK,

    I want to be able to Touch the player pawn and drag it around. I followed Epic's example in their Mobile Input System document and it works for any of my custom pawns except the one spawned by the PlayerStart. When I touch one of the manually placed pawns, I get back its name. But when I touch the pawn spawned by the PlayerStart, I get back WorldInfo_3. I believe it is failing to find the actor at this line in the PickActor function:

    PickedActor = Trace(HitLocation, HitNormal, TouchOrigin + (TouchDir * PickDistance), TouchOrigin, true);

    I've searched for days trying to figure out the difference between the manually placed pawns and the PlayerStart pawn in relation to tracing it to find the touched object, but no luck. Any help is greatly appreciated, thanks.

  2. #2

    Default

    Still searching for an answer to this issue. I did make some progress. Based on other thread discussions, I triggered the Pawn's death and then the PickActor function found the correct object instead of the WorldInfo object. This lead to other ideas that maybe it was the rigid body collision. But still no luck. I've included my PlayerController (minus the touch sample code from Epic) and my full Pawn code. Any ideas? Back to searching, if I figure out what I'm missing, I'll post back here. Thanks.


    class BDG_PlayerController extends GamePlayerController;

    ...
    ... Epic's PickActor, HandleInputTouch and InitInputSystem mobile touch imput sample code here
    ...

    defaultproperties
    {
    PickDistance=100000
    ClickTolerance=5

    InputClass=class'GameFramework.MobilePlayerInput'
    }



    class BDG_PlayerPawn extends MobilePlaceablePawn implements(ITouchable);

    var StaticMeshComponent MyMesh;

    function OnTouch(ETouchType Type, float X, float Y)
    {
    WorldInfo.Game.Broadcast(self, "Touched:"@self);
    }


    defaultproperties
    {
    bCollideWorld=true
    bCollideActors=true
    bBlockActors=true

    Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment2
    bEnabled=True
    End Object
    Components.Add(MyLightEnvironment2)

    Begin Object Class=StaticMeshComponent Name=PawnMesh2
    StaticMesh=StaticMesh'EngineMeshes.Sphere'
    LightEnvironment=MyLightEnvironment2
    bNotifyRigidBodyCollision=true
    CollideActors=true
    BlockActors=true
    BlockZeroExtent=true
    BlockNonZeroExtent=true

    bDisableAllRigidBody=false
    RBChannel=RBCC_Pawn

    RBCollideWithChannels={(
    Default=true,
    BlockingVolume=true,
    GameplayPhysics=true,
    EffectPhysics=true,
    FracturedMeshPart=FALSE
    )}

    Scale3D=(X=0.1, Y=0.1, Z=0.1)
    End Object
    Components.Add(PawnMesh2)
    CollisionComponent=PawnMesh2
    MyMesh=PawnMesh2
    }

  3. #3

    Default

    I never did figure this issue out. I'm starting to think it is impossible to trace the pawn spawned from the PlayerStart navigation point. I'm going to instead ignore the PlayerStart and manually spawn my pawn to use.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.