Creating a timer in script
-
Hi SU fans
Can anyone help me make a timer to display the interval (secs) of a falling object hitting a baseplate (see model)Faust kindly contributed this to detect the object hitting the plate - it resets on impact and I loose all the time info on screen. There is no pause or stop action to replace reset AFAIK
onTouch { |toucher, position, normal|
MSPhysics::Simulation.reset
}I have discovered the
start_timer and stop_timer
action but don't know how to use it
Ideally the interval result should be displayed on screen or otherwise accessible, and there should be a facility to have a coeff to adjust the result to the correct answer - frig factor (1s) as I noticed the on screen timer/fps is not accurate and depends on several settings (time step, linear damping et al)Sorry to be a Ruby newbie but trying my best

and this could be so useful for dynamic simulation validation
CheersRobin
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement