How to get direction and speed of punch

changed the topic and now there is a solution

You havent added any Vector3 value to the ApplyImpulse() Eg:
RightArm:ApplyImpulse(Vector3.new(0,5,0)) – This will apply an impulse force of 5 in the Y direction

ohhh, i thought it uses the vector3 without needing to - am i able to translate the movement of the arm and apply it to the applyimpulse?

What are you trying to do? im unsure of what you mean

just make a punch for a game - as i thought applying impulse gets the force and velocity and then i can take that data to follow up with another script.

Ah you can get the direction you can do
RightArm.AssemblyLinearVelocity – This will return a Vector3 value, of the linear velocity of the arm, EG what direction its travelling in

To get a sum of the speed you can do
RightArm.AssemblyLinearVelocity.Magnitude – This will return a single number of the velocity speed

just quickly, how would i get the force applied depending on the speed and position. Would constraints or bodymovers help?

You mean how would you calculate the force?
I mean Force = Mass*Acceleration

So I guess in your case
Force = RightArm.Mass*RightArm.AssemlyLinearVelocity.Magnitude
Maybe?

1 Like

thanks you helped alot

(adding extra characters to reply)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.