Announcement

Collapse
No announcement yet.

Weapon>SetPosition&LagRot

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

  • replied
    Can Anyone Help me?
    how to use this Scripts?
    Please Help

    Leave a comment:


  • replied
    Really thanks, worked fine.

    Leave a comment:


  • replied


    Paste this code in your Class weapon

    simulated event SetPosition(UDKPawn Holder)
    {
    local vector DrawOffset, ViewOffset;
    local rotator NewRotation;

    if ( !Instigator.IsFirstPerson() )

    return;

    SetHidden( false );

    PlayerViewOffset.X = 0;
    PlayerViewOffset.Y = 0;
    PlayerViewOffset.Z = 0;

    DrawOffset = PlayerViewOffset;

    DrawOffset.Z = UTPawn(Holder).GetEyeHeight();

    SetLocation( Holder.Location + DrawOffset );

    NewRotation = (Holder.Controller == None ) ? Holder.Rotation : Holder.Controller.Rotation;

    NewRotation.Yaw = LagRot2(NewRotation.Yaw & 65535, Rotation.Yaw & 65535, MaxYawLag);
    NewRotation.Pitch = LagRot2(NewRotation.Pitch & 65535, Rotation.Pitch & 65535, MaxPitchLag);


    SetRotation(NewRotation);
    }


    simulated function int LagRot2(int NewValue, int OldValue, float MaxDiff)
    {
    if ( (NewValue) ClockWiseFrom (OldValue) )
    {
    if ( OldValue > NewValue )
    {
    OldValue -= 65535;
    }
    if ( NewValue - OldValue > MaxDiff )

    OldValue =( NewValue - MaxDiff);
    }
    else
    {
    if ( OldValue < NewValue )
    {
    NewValue -= 65535;
    }
    if ( OldValue - NewValue > MaxDiff )

    OldValue = (NewValue + MaxDiff);
    }
    return (OldValue + 0.6 * (NewValue - OldValue));
    }

    Leave a comment:


  • replied
    What did you do to fix?

    Leave a comment:


  • replied
    I made it!!! http://www.youtube.com/watch?v=GXuAeDlkdno and http://www.youtube.com/watch?v=5YZs0...ature=youtu.be

    Leave a comment:


  • replied
    Originally posted by VendorX View Post
    Put your files in some human site, because peoples don't know how to download from russian... things...
    http://depositfiles.com/files/9hrgb827s

    Leave a comment:


  • replied
    Put your files in some human site, because peoples don't know how to download from russian... things...

    Leave a comment:


  • replied
    I want to make a smooth movement of arms

    Leave a comment:


  • replied
    Is there a question in here somewhere?

    Leave a comment:


  • started a topic Weapon>SetPosition&LagRot

    Weapon>SetPosition&LagRot

    Weapon & scripts: http://narod.ru/disk/26102760001/UDK_.rar.html or http://depositfiles.com/files/9hrgb827s
    Video: http://www.youtube.com/watch?v=xGiVN...eature=related

    Needs to be done smoothly sight, please help.

    Functions SetPosition & LagRot in script M4A1.uc


    For russian people > http://forums.epicgames.com/threads/...apon-Rotations
Working...
X