Is there a way to determine the force of a collision pre-solve???
I have a bouncy ball in my scene.
I want it to make a little bouncy sound when it hits the ground if the force is greater than a certain amount.
I know I can do this with Event.POST_SOLVE listener and Event.maxImpulse, but the sound effect sounds a bit late if I do that.
Is there anyway to determine the "maxImpulse" or force of a collision pre_solve?
Or does anyone have any other ideas?
Comments
And yes, basically you'd need some relative values, so it should be more than enough
I'm still noticing a bit of lag from when the pre-collision event occurs to when I actually hear the sound effect. I've chopped all the dead space out of the begining of my sound effect .wav file so that shouldn't be a problem.
I suspect the lag is coming from gideros loading and playing the file. Any thoughts?
There are a few different sounds I want the ball to make so I'm thinking about putting all the sound effects for the ball into one .wav file then pausing/unpausing and skipping forward/back in the .wav file for the different sounds.
Could you check this project and see if you have the same problem?
https://github.com/ar2rsawseen/GameTemplateOld
The sound still seems to be a bit lagged to me.
Maybe I'm just being a bit too picky.
I'll figure something out.
Thanks for the help.
https://github.com/ar2rsawseen/GameTemplate
Oh, and of course latency may depend on which version of Gideros you are using.
I think sound latency was improved after 2012.09.05 version