Boxing game...get the power of the punches thrown ?

i`m making game in Unity - VR in which I punch appearing object and get points for hiting them. I was wondering is there any way that I could get the info. of the power of punches thrown ? I know I can get the the coordinates of the current positions (x,y,z), but is there any way to get a feedback of the speed of these punches ? thx

If your ‘punch objects’ contain rigidbody component, you can use punchRigibody.velocity.magnitude to get a length of the vector [speed]. If the objects do not contain rigidbody, you can create a new script and calculate the speed by checking old and new positions. You can follow the example below:

Vector3 oldPosition;
float speed;

void LateUpdate()
{
   oldPosition = transform.position;
}

void Update()
{
   speed = (transform.position - oldPosition).magnitude;
}