Alritey, new here, not new to Indie Game Development.
First to try this out I did the following:
Created a Fresh Blank Project from the launcher → ClientFps
Then copied Source / Config from ShooterGame → ClientFps
Then proceeded to Replace all instances of the following:
ShooterGame → ClientFps
Shooter → Client
SHOOTER → CLIENT
etc…
Then Renamed the Source and Build files as needed
Then I generated the C++ project using the context choice for the ClientFps.uproject
This built and loaded fine at this point with just a few complaints which I cleared up.
I then proceeded to Bring in the Weapons and Player Shapes and animations only from ShooterGame
using the Migrate feature to ClientFps, this seemed to work fine. Bones showed, animations worked, etc…
(Editor viewing so far).
Now I proceeded to Duplicate all the Animation Blueprints and Supporting blueprints used by the Pawn and
the Weapons (Projectiles etc…) This all seemed to go well. At this point I proceed to manuualy duplicate
the Primary Blueprints (BotPawn PlayerPawn Weapons)
This all worked it appeared fine so I then connected the Source Pawn spawn code with the new PlayerPawn
blueprint as created and then made a TeamStart point in the Simple StarterMap. It worked amazingly except
for one thing. The Weapons are Facing Down in First person. Showing properly in 3rd when UNpossessed.
I then went in and tried to find the issue. I have been unable to find the cause of this, I even tried changing this
(Original file was ShooterWeapon.cpp → ClientWeapon.cpp)
`void AClientWeapon::AttachMeshToPawn()
{
if (MyPawn)
{
// Remove and hide both first and third person meshes
DetachMeshFromPawn();
// For locally controller players we attach both weapons and let the bOnlyOwnerSee, bOwnerNoSee flags deal with visibility.
FName AttachPoint = MyPawn->GetWeaponAttachPoint();
//if( MyPawn->IsLocallyControlled() == true )
//{
USkeletalMeshComponent* PawnMesh1p = MyPawn->GetSpecifcPawnMesh(true);
USkeletalMeshComponent* PawnMesh3p = MyPawn->GetSpecifcPawnMesh(false);
Mesh1P->SetHiddenInGame( false );
Mesh3P->SetHiddenInGame( false );
Mesh1P->AttachTo(PawnMesh1p, AttachPoint);
Mesh3P->AttachTo(PawnMesh3p, AttachPoint);
//}
//else
//{
// USkeletalMeshComponent* UseWeaponMesh = GetWeaponMesh();
// USkeletalMeshComponent* UsePawnMesh = MyPawn->GetPawnMesh();
// UseWeaponMesh->AttachTo(UsePawnMesh, AttachPoint);
// UseWeaponMesh->SetHiddenInGame( false );
//}
}
}
`
In attempt to see where the issue was coming from. All the blueprints are manually created duplicates of the
ShooterGame (Had both Projects running in the editor to make sure I got em right). This is still a learning
period for me, so any assistance would be appreciated.
Details:
Weapon (Basic Gun) shows the correct 3 bones. It is pointing a nice 90 degress down
It is actually shooting correctly from the Muzzle and heading out in the direction the cursor is aimed.
It reloads (using the animations) just in the wrong rotation.
In the Editor it is showing both 1st/3rd versions with the 3p Point up in a 90 position as the original demo.
Any Ideas?