Page 1 of 1

Projectile Fail

Posted: Tue Dec 29, 2009 10:09 pm
by metal_head
Soo, I don't really know where to post this. Basicly it's about projectiles and their boundingboxes, colliding with other pawns, such as the scripted player.
I got 2 shots from my test level in my mini project, the first one shows how the boundingboxes of the projectile and my pawn actually colldide with each other and the player doesn't get hit, the second one is just how this looks without boundingbox mode:
http://drivingblind.eu/box_bug.jpg
http://drivingblind.eu/box_bug2.jpg

My projectile definition:

Code: Select all

[AiBolt]
type = projectile
effect0 = ai_bolt
effectbone0 = 
actor = Projectile\w_bullet.act
rotation = 0 -90 90
scale = 0.01
gravity = false
bounce = false
speed = 600
lifetime = 10
boundingbox = 40
damage = 15
altdamage = 15
shakeamount = 0
shakedecay = 0
explosionradius = 256
explosiondamage = 0
decal = 0
bonelevel = false
attachactor = true
The shooting from the enemy script:

Code: Select all

SetTargetPoint(0,-100,0);
FireProjectile("AiBolt", FIREBONE, 0, 0, 0, "health_player");
The projectile can hit my pawn, but only if at least half of it's boundingbox has collided with the pawn, which leads me to the toughts, that maybe the wireframe is the one, that matters, but I'll leave this theory to the guys, who have access to RF's source code and know what's written in there.

So meanwhile, if there's a way to make the projectile correctly collide with the player, please tell me, cuz the project was supposed to be out on 1.1.10, but things like this are really not helping me. :)

Re: Projectile Fail

Posted: Wed Dec 30, 2009 9:21 am
by QuestOfDreams
Projectiles test collision at the level of bone bounding boxes (which are axial aligned like the overall bounding box btw). I suppose that the bones of your actors don't cover the whole body so that could be the problem...

Re: Projectile Fail

Posted: Wed Dec 30, 2009 7:49 pm
by metal_head
Well, I made a new projectile model and still the result is absolutely the same, I made sure that the projectile is rotated correctly.

Re: Projectile Fail

Posted: Wed Dec 30, 2009 9:25 pm
by Jay
QoD means the actors of the enemies and the player, not the projectiles.

Re: Projectile Fail

Posted: Thu Dec 31, 2009 1:43 pm
by metal_head
Oh, so I'll have to put bones all over my player pawn for this to work. Got it! Not cool is the fact, that I'll have to redo all of it's animations, but shouldn't be that much pain in the ass.

Re: Projectile Fail

Posted: Thu Dec 31, 2009 3:50 pm
by metal_head
OK, I put lots of bones all over the actor, and still nothing, the projectile goes through the actor....

Re: Projectile Fail

Posted: Thu Dec 31, 2009 6:57 pm
by QuestOfDreams
Hm, I should think twice before posting, sorry... Of course the bone bounding boxes of your actor did already cover the whole body as they include all vertices that are assigned to a specific bone (and all vertices must be assigned to a bone... silly me). The problem is either that your actors are completely flat and the collision routine just misses the hit or there's a bug in the collision detection. :?

Re: Projectile Fail

Posted: Thu Dec 31, 2009 8:57 pm
by metal_head
No problem, Qod! I had several animations, that needed redoing anyway :)
Well, probably is the first one, which should be a bug in the collision detection, so maybe both? Ah, so what can I do about it? I've even seen projectiles fly through my pawn, but I tough that it was the projectile definition. I've tried to put a box with an invisible TGA texture arround the pawn and that messes with the rendering...