Projectile Fail

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Projectile Fail

Post by metal_head » Tue Dec 29, 2009 10:09 pm

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. :)

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Projectile Fail

Post by QuestOfDreams » Wed Dec 30, 2009 9:21 am

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...

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Projectile Fail

Post by metal_head » Wed Dec 30, 2009 7:49 pm

Well, I made a new projectile model and still the result is absolutely the same, I made sure that the projectile is rotated correctly.
Attachments
bones.jpg
(127.14 KiB) Not downloaded yet

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Projectile Fail

Post by Jay » Wed Dec 30, 2009 9:25 pm

QoD means the actors of the enemies and the player, not the projectiles.
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Projectile Fail

Post by metal_head » Thu Dec 31, 2009 1:43 pm

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.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Projectile Fail

Post by metal_head » Thu Dec 31, 2009 3:50 pm

OK, I put lots of bones all over the actor, and still nothing, the projectile goes through the actor....
Attachments
bones.jpg
(114 KiB) Not downloaded yet

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Projectile Fail

Post by QuestOfDreams » Thu Dec 31, 2009 6:57 pm

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. :?

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Projectile Fail

Post by metal_head » Thu Dec 31, 2009 8:57 pm

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...

Post Reply