eldv
Junior vMember
Posts: 47
|
Post by eldv on Sept 8, 2022 1:21:31 GMT
I was able to figure out how to get left and right footstep marks to appear depending on which foot hits the ground.
in vAudioSurface, beneath the stepMark GameObject variable, add two public GameObjects named leftMark; and rightMark;.
in the StepMark function, just below the line " if (stepMark) " add the following code:
if (footStep.sender.name == "rightFoot_trigger") { if (rightMark) {
stepMark = rightMark; //Debug.Log(stepMark); //if you want to make sure its working. }
} if (footStep.sender.name == "leftFoot_trigger") {
if (leftMark) {
stepMark = leftMark; //Debug.Log(stepMark); //if you want to make sure its working.
}
}
that should do it, just remember to populate the left and right stepmarks in the AudioSurfaces you're using. You'll need to have step mark game objects for each. You can duplicate and modify the gameobject and material and dimensions (if needed) of the existing default stepmark if you don't know how to create one on your own.
|
|