Announcement

Collapse
No announcement yet.

proble with free 3er person CAMERA and TRIGGERS

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

  • replied
    I´ve change my custom mesh to CH_LIAM_Cathode.Mesh.SK_CH_LIAM.Cathode, and nothig again... It´s not a problem to my custom mesh... so, where is the problem!!!

    help friends!!!!!

    Leave a comment:


  • replied
    yes, that is not the problem... anyway, i try first with trigger_touch...

    thanks... and, please, i am desesperated!

    see you!

    Leave a comment:


  • replied
    This may have already been tried but have you turned off the settings in the Kismet trigger that says "Aim To Interact."?

    Leave a comment:


  • replied
    anybody knows any about my problem?
    please i need your help!

    I tried with custom Physic assets, but nothing...

    I inserted in my CustomPawn Code thisline, in default properties:
    Begin Object Name=CollisionCylinder
    CollisionRadius=+0021.000000
    CollisionHeight=+0044.000000
    End Object
    CylinderComponent=CollisionCylinder
    but nothing again... i can change collisionRadius and Heigh, but nothing with the triggers...

    help!!!!

    thanks for yor time!

    Leave a comment:


  • replied
    class CustomGame extends UTDeathmatch;





    defaultproperties
    {

    PlayerControllerClass=Class'SATSCGameScript.Custom PlayerController'
    DefaultPawnClass=class'SATSCGameScript.CustomPawn'
    HUDType=None


    MapPrefixes[0]="UDN"

    }

    class CustomPlayerController extends UTPlayerController;

    state PlayerWalking
    {
    ignores SeePlayer, HearNoise, Bump;

    event NotifyPhysicsVolumeChange( PhysicsVolume NewVolume )
    {
    if ( NewVolume.bWaterVolume && Pawn.bCollideWorld )
    {
    GotoState(Pawn.WaterMovementState);
    }
    }

    function ProcessMove(float DeltaTime, vector NewAccel, eDoubleClickDir DoubleClickMove, rotator DeltaRot)
    {
    if( Pawn == None )
    {
    return;
    }

    if (Role == ROLE_Authority)
    {
    // Update ViewPitch for remote clients
    Pawn.SetRemoteViewPitch( Rotation.Pitch );
    }

    Pawn.Acceleration = NewAccel;
    CheckJumpOrDuck();
    }

    function PlayerMove( float DeltaTime )
    {
    local vector X,Y,Z, NewAccel;
    local eDoubleClickDir DoubleClickMove;
    local bool bSaveJump;
    local Rotator DeltaRot, ViewRotation, OldRot, NewRot;;


    if( Pawn == None )
    {
    GotoState('Dead');
    }
    else
    {
    GetAxes(Rotation,X,Y,Z);


    class CustomPawn extends UTPawn;

    var bool bFreeLookMode;

    var AnimNodeAimOffset AimNode;

    simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)
    {
    local UTPlayerReplicationInfo PRI;
    local int i;
    local int TeamNum;
    local MaterialInterface TeamMaterialHead, TeamMaterialBody, TeamMaterialArms;
    local SkeletalMesh JugadorMesh; //skin del jugador

    local PhysicsAsset JugadorPhy; //fisica del jugador
    local AnimSet JugadorAnim[20]; // Animacion del jugador *No aplicado aun, checar arrays en Unreal Script

    //The path to the skeletal model you want to use:
    JugadorMesh=SkeletalMesh'SH_pack1.player.James_Ske letalMesh';

    JugadorPhy=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_ Corrupt_Male_Physics';
    JugadorAnim[0]=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_AimOffset' ;
    JugadorAnim[1]=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale';

    PRI = GetUTPlayerReplicationInfo();

    if (Info != CurrCharClassInfo)
    {
    // Set Family Info
    CurrCharClassInfo = Info;

    // get the team number (0 red, 1 blue, 255 no team)
    TeamNum = GetTeamNum();

    // AnimSets
    Mesh.AnimSets = Info.default.AnimSets;

    //Apply the team skins if necessary
    if (WorldInfo.NetMode != NM_DedicatedServer)
    {
    Info.static.GetTeamMaterials(TeamNum, TeamMaterialHead, TeamMaterialBody);
    }

    // 3P Mesh and materials
    //SetCharacterMeshInfo(Info.default.CharacterMesh, TeamMaterialHead, TeamMaterialBody);
    SetCharacterMeshInfo(JugadorMesh, TeamMaterialHead, TeamMaterialBody);
    // First person arms mesh/material (if necessary)
    if (WorldInfo.NetMode != NM_DedicatedServer && IsHumanControlled() && IsLocallyControlled())
    {


    class CustomCamera extends GamePlayerCamera;



    var Vector CurrentCamLocation;

    var Rotator CurrentCamRotation;

    var float DesiredTurn;



    var(FollowCam) float FollowCamDist;

    var(FollowCam) Vector FollowZOffset;

    var(FollowCam) Vector CamLookOffset;

    var(FollowCam) float TurnRateRatio;



    function UpdateViewTarget(out TViewTarget OutVT, float dt)

    {

    local CameraActor CamActor;

    local Vector HitLocation, HitNormal;

    local Actor HitActor;



    // Default FOV on viewtarget

    OutVT.POV.FOV = DefaultFOV;



    // Viewing through a camera actor

    CamActor = CameraActor(OutVT.Target);

    if( CamActor != None )

    {

    // In LD cinematic!

    CamActor.GetCameraView(dt, OutVT.POV);



    // Grab aspect ratio from the CameraActor

    bConstrainAspectRatio = bConstrainAspectRatio || CamActor.bConstrainAspectRatio;

    OutVT.AspectRatio = CamActor.AspectRatio;



    // CameraActor wants to override the PostProcess settings



    CamPostProcessSettings = CamActor.CamOverridePostProcess;



    // Set my variables to account for current targeting

    CurrentCamLocation = OutVT.POV.Location;

    CurrentCamRotation = OutVT.POV.Rotation;

    }

    // Give Pawn Viewtarget a chance to dictate the camera position

    else if( Pawn(OutVT.Target) != None && Pawn(OutVT.Target).CalcCamera(dt, OutVT.POV.Location, OutVT.POV.Rotation, OutVT.POV.FOV) )

    {

    // If this ever happens send me an email!

    `log("NOTICE ME: No idea when this happens!");

    CurrentCamRotation = OutVT.POV.Rotation;

    CurrentCamLocation = OutVT.POV.Location;

    }

    // Finally, we can make our own camera!

    else

    {

    switch( CameraStyle )

    {

    case 'FollowCam':

    RotationUpdate(OutVT, dt);

    FollowCamTarget(OutVT, dt);

    break;

    }

    // *********************************************

    HitActor = Trace(HitLocation, HitNormal, CurrentCamLocation,

    OutVT.Target.Location, false, vect(12,12,12));



    if (HitActor != none)

    CurrentCamLocation = HitLocation;



    OutVT.POV.Location = CurrentCamLocation;

    OutVT.POV.Rotation = CurrentCamRotation;

    }



    // Lets LDs do shake and whatnot

    ApplyCameraModifiers(dt, OutVT.POV);

    }






    function RotationUpdate(TViewTarget OutVT, float dt)

    {

    local Vector fromTarget;
    local Vector desiredDir;
    local float currAngle;
    local float desiredAngle;
    local Vector CamNoZ;
    local Vector TargetNoZ;

    CamNoZ = CurrentCamLocation;
    CamNoZ.Z = 0.f;
    TargetNoZ = OutVT.Target.Location;
    TargetNoZ.Z = 0.f;

    fromTarget = CamNoZ - TargetNoZ;

    if(fromTarget.X != 0) currAngle = Atan(fromTarget.Y / fromTarget.X);
    else currAngle = Pi/2;
    if(fromTarget.X < 0 ) currAngle -= Pi;

    desiredAngle = currAngle + DesiredTurn / TurnRateRatio;

    desiredDir.Y = Sin(desiredAngle);
    desiredDir.X = Cos(desiredAngle);

    CurrentCamLocation = OutVT.Target.Location + (desiredDir*VSize(fromTarget));


    }








    function FollowCamTarget(TViewTarget OutVT, float dt)

    {

    local Vector toTarget;

    local Vector CamNoZ;

    local Vector TargetNoZ;



    CamNoZ = CurrentCamLocation;

    CamNoZ.Z = 0.f;

    TargetNoZ = OutVT.Target.Location;

    TargetNoZ.Z = 0.f;



    toTarget = TargetNoZ - CamNoZ;

    toTarget = Normal(toTarget);



    CurrentCamLocation = toTarget * -FollowCamDist + OutVT.Target.Location + FollowZOffset;



    toTarget = OutVT.Target.Location - CurrentCamLocation;

    CurrentCamRotation = rotator(toTarget + CamLookOffset );

    }







    DefaultProperties

    {

    FollowCamDist=416.f

    DesiredTurn=0.f

    TurnRateRatio=10240.f

    FollowZOffset=(X=0.f,Y=0.f,Z=160.f)

    CamLookOffset=(X=0,Y=0,Z=100)

    DefaultFOV=70.f

    }

    I thing that the problem is in Custom.Camera or maybe in other code about CustomImput.
    class CustomInput extends UTPlayerInput within CustomPlayerController;



    var(MG_Input) float turnRate;
    var bool bMoveLocked;
    var float HotSpotRadius;
    var Rotator currCamRot;
    var Vector oldJoy;



    event PlayerInput( float DeltaTime )

    {

    local Vector move, facing, joy;
    local float moveDeltaAbs;
    local Rotator rot, camRot, playerRot;

    super.PlayerInput(DeltaTime);

    move.X = aStrafe;
    move.Y = aForward;
    move.Z = 0.f;

    facing.x = aForward;
    facing.Y = aStrafe;
    facing.Z = 0.f;

    joy.X = RawJoyRight;
    joy.Y = RawJoyUp;

    moveDeltaAbs = Abs(joy.Y - oldJoy.Y) + Abs(joy.X - oldJoy.X);

    if(!bMoveLocked)

    {
    if( ( move.X != 0.f || move.Y != 0.f ) && moveDeltaAbs < HotSpotRadius )

    bMoveLocked = true;

    currCamRot = CustomCamera(PlayerCamera).CurrentCamRotation;
    oldJoy = joy;
    }

    else if(aTurn != 0.f || moveDeltaAbs > HotSpotRadius)

    {

    bMoveLocked = false;
    oldJoy = joy;
    }


    playerRot.Yaw = Rotation.Yaw;
    camRot.Yaw = currCamRot.Yaw;

    move = TransformVectorByRotation(camRot, move, true);
    move = TransformVectorByRotation(playerRot, move, false);
    aForward = move.Y;
    aStrafe = move.X;

    facing = TransformVectorByRotation(camRot,facing,false);
    if( move.X != 0.f || move.Y != 0.f )
    {
    rot = RInterpTo( Rotation, Rotator( Normal(facing) ), DeltaTime, turnRate );
    SetRotation(rot);
    }
    else bMoveLocked = false;

    CustomCamera(PlayerCamera).desiredTurn = aTurn;
    aTurn = 0.f;
    }






    DefaultProperties

    {

    bMoveLocked = true
    turnRate = 6.f
    HotSpotRadius = 0.25f
    bLockTurnUntilRelease = false

    }
    this last code abou CustomINPUT is not in use in this moment in my game. (only use now: THE FIRST 4: Game, Camera, Pawn and Controller. I erased it (CUSTOMINPUT) because dont worked properly.

    any other idea?

    Leave a comment:


  • replied
    You're probably doing something in your code you shouldn't or you are forgetting something. Don't forget to call base functions like PostBeginPlay if you override it.

    Post the code if you want to let us have a look at it more in depth.

    Leave a comment:


  • replied





    this is the problem.

    anybody help me? Thanks again

    Leave a comment:


  • replied
    i am not sure, but if I set another game type (like first person, etc) the trigger works... but when i play in my custom game type (free 3er person) the triggers dondt works...

    Leave a comment:


  • replied
    Does your pawn have collision?

    Leave a comment:


  • started a topic proble with free 3er person CAMERA and TRIGGERS

    proble with free 3er person CAMERA and TRIGGERS

    Hey friends...

    I have a problem whith the CAMERA and TRIGERS.

    I change the Camera view to free 3erd person, and i have my own animations, pawn, controll, etc...

    well, here my problem:

    the TRIGERS don´t work with the change!!!

    Anybody knows why? where is the problem?...
    I need your help!!!

    thanks, and sorry my english again!

    see you
Working...
X