Sunday, 12 May 2013

Fixed firing location on weapon classes!!!!

Finally managed to find a solution to the firing location on the weapon classes!!!

I simply had to replace this in the weapon classes
(DysfunctionalWeap_BlunderBlade.uc and DysfunctionalWeap_BlunderBladeBot.uc):

simulated function vector InstantFireStartTrace()
    return GetPhysicalFireStartLoc();

With this beautiful selection of code developed by Frankycfurter ( :

simulated function vector GetPhysicalFireStartLoc(optional vector AimDir)
Local SkeletalMeshComponent AttachedMesh;
local vector SocketLocation;
Local DysfunctionalPawn P;

P = DysfunctionalPawn(Owner);
AttachedMesh = P.CurrentWeaponAttachment.Mesh;
AttachedMesh.GetSocketWorldLocationAndRotation(MuzzleFlashSocket, SocketLocation);
return SocketLocation;

And here is the wondrous result in action:

    Mike Rowntree

No comments:

Post a Comment