Doubt in collision testing
by Nirman · in Torque Developer Network · 12/21/2010 (11:09 am) · 0 replies
Hi Everyone,
I have an "idle" animated sprite for start up. I have set the collision points for it. I have another static sprite which is the opponent and have set the collision points for the same. characters can kick and punch on right click and left click respectively. When they kick i play the kickAnimation using %this.playAnimation(kickAnimation); it plays correct.
Now my problem statement is when punch or kick animation is played it cannot detect collision because kick goes out of the collision boundary i created with the idle sprite. Since animation are played at runtime i cannot set the collision points for them (or can i? if yes, how?) So what do i do to get correct collision contact points when the fist or feet touches the opponent. please show me direction on this or if you can explain me with some code or procedure it will be great help.
Thanks in advance.
I have an "idle" animated sprite for start up. I have set the collision points for it. I have another static sprite which is the opponent and have set the collision points for the same. characters can kick and punch on right click and left click respectively. When they kick i play the kickAnimation using %this.playAnimation(kickAnimation); it plays correct.
Now my problem statement is when punch or kick animation is played it cannot detect collision because kick goes out of the collision boundary i created with the idle sprite. Since animation are played at runtime i cannot set the collision points for them (or can i? if yes, how?) So what do i do to get correct collision contact points when the fist or feet touches the opponent. please show me direction on this or if you can explain me with some code or procedure it will be great help.
Thanks in advance.
About the author