Announcement

Collapse
No announcement yet.

Heres a few working scripts for true first person camara, use it as you like

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

    Heres a few working scripts for true first person camara, use it as you like

    ------------------------------------------------------------------
    class CarnageGame extends UTGame;

    defaultproperties
    {
    PlayerControllerClass=class'Carnage.PlayerMoifiact ions'
    DefaultPawnClass=class'Carnage.MainCharecter01A'
    }


    --------------------------------------------------------------------

    class MainCharecter01A extends UTPawn
    placeable;

    simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)
    {

    }

    DefaultProperties
    {

    Begin Object Name=WPawnSkeletalMeshComponent
    SkeletalMesh=SkeletalMesh'RecentPrefabs001.Skeleta lMeshPoseMainC'
    AnimSets[0]=AnimSet'RecentPrefabs001.SkeletalMeshPoseMainC_An ims'
    AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_ Human'
    PhysicsAsset=PhysicsAsset'RecentPrefabs001.Mesh.Ma inCharecter_Phisics'
    RBCollideWithChannels=(Cloth=true)
    bHasPhysicsAssetInstance=true
    ScriptRigidBodyCollisionThreshold=0.001
    bNotifyRigidBodyCollision=true
    End Object
    Mesh=WPawnSkeletalMeshComponent

    Begin Object Name=CollisionCylinder
    ScriptRigidBodyCollisionThreshold=0.001
    bNotifyRigidBodyCollision=true
    End Object
    CylinderComponent=CollisionCylinder

    RagdollLifespan=0.0

    bPushesRigidBodies=true
    }
    ---------------------------------------------------------------------------

    class PlayerMoifiactions extends UTPlayerController
    Placeable;

    Var() Vector CarangeViewOffset;


    Simulated event PostBeginPlay()
    {
    super.PostBeginPlay();

    SetBehindView(true);
    }

    simulated event GetPlayerViewPoint(out vector out_Location, out Rotator out_Rotation)
    {
    super.GetPlayerViewPoint(out_Location, out_Rotation);
    if(Pawn != none)
    {
    Pawn.Mesh.SetOwnerNoSee(false);
    out_Location = Pawn.Location + CarangeViewOffset;
    //out_Rotation = rotator(Pawn.Location);
    }
    }





    exec function FOV(float F)
    {
    if( PlayerCamera != None )
    {
    PlayerCamera.SetFOV(80);
    return;
    }
    }


    defaultproperties
    {
    CarangeViewOffset=(X=0,Y=0,Z=39)
    //ViewRotation.Yaw += 4096; Changeable

    }
    ----------------------------------------------------------

    !!! if your new to unreal script but you still understand the basics of the default properties i recommend this, and you shouldnt have a problem implamenting it

    [note you will have to ajust the charecters skeletalmesh orgin within animset editor to get the camara just right enjoy!!

    you can also contact me on skype at m1ke1sam1sh for any questions
Working...
X