|
Post by witchthewicked on Oct 16, 2019 5:00:18 GMT
In the vShooterMeleeInput.cs I would like the method to have an exposed parameter to take in the mouse down to rotate. This allows the character to rotate while attacking.
public override void RotateWithCamera(Transform cameraTransform)
{
// neat mouse hack to move character to face the position while i am attacking
// ORIGINAL CODE : if (cc.isStrafing && !cc.customAction && rotateToCameraFwdWhenMoving)
if ((isAttacking || cc.isStrafing) && !cc.customAction && rotateToCameraFwdWhenMoving)
{
// smooth align character with aim position
if (tpCamera != null && tpCamera.lockTarget)
{
cc.RotateToTarget(tpCamera.lockTarget);
}
// rotate the camera around the character and align with when the char move
else if (cc.input != Vector2.zero || (isAiming || aimTimming > 0) || rotateToCameraFwdWhenStanding)
{
Debug.Log("Here" + Time.time * 1000);
cc.RotateWithAnotherTransform(cameraTransform);
}
}
}
Rotating while attacking is a great feature for the melee combat
|
|
|
Post by Invector on Oct 16, 2019 13:12:44 GMT
Thanks for the suggestion, but we actually just rewrote every method that makes the character move and rotates, you should expect big changes in the next update
|
|