player impacted by own bullets
by rennie moffat · in Torque Game Builder · 09/16/2009 (3:18 pm) · 4 replies
Hi I just debugged a problem I was having, my player when ever he fired, would move back a nudge, an impact from the shot. I turned setCollisionActive (true, true) to (true, false) so, this means that the bullet sends, but does not receive collisions now. So my question is, if the bullet does not receive collisions and that solved the problem, why would that effect the player? if anything I would expect the player to have been modified to not receive the bullets collisions.
:/
:/
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
#2
meant to thank you for the last posts,
they meant a lot in terms of answering stuff. very helpful, I will look at these.
thanks.
quick question tho for this, is it a general rule when you set a group with Groups("1 12 17"), you don't need any commas?, its just seen as a string, the spaces are good enough?
Ps. I have seen, this and briefed through it. Your response makes sense tho.
09/18/2009 (9:10 pm)
thanks man, meant to thank you for the last posts,
they meant a lot in terms of answering stuff. very helpful, I will look at these.
thanks.
quick question tho for this, is it a general rule when you set a group with Groups("1 12 17"), you don't need any commas?, its just seen as a string, the spaces are good enough?
Ps. I have seen, this and briefed through it. Your response makes sense tho.
#3
Hope this helped :)
09/19/2009 (3:29 pm)
Thats what happened to me awile back you just Set the Bullet to a layer like 2 then under the collison tab cilck on the 1,it should turn grey. Then on the player set his layer to 1 and click on the 2.Hope this helped :)
#4
All good tho, thanks!
09/19/2009 (7:34 pm)
Yah I will go back, it was all a learning experience. I was just trying to figure out simple characteristics of the TGB software.All good tho, thanks!
Torque Owner Giuseppe Bertone
DGform s.r.l.
the quick response is: use different collision groups for player and bullets. You can do it easily visually with TGB or via script, i.e.
//Specifies a set of groups to collide against as a space-separated string. %playerBullets.setCollisionGroups("0 3 5 7"); %player.setCollisionGroups("1 12 13");I suggest also to follow the long response. At this post you will find a link to the Collision Detection and Response pdf: that is a real must-read document and, most of all, it is edited by the supreme TGB mentor Melv May. :-)