Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Wed Jun 19, 2013 5:47 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: monsters freezing in mid air instead of dying
PostPosted: Sun Feb 26, 2006 1:21 pm 
Offline
picked up 200 ammo

Joined: Sun Jan 30, 2005 10:59 am
Posts: 278
Hi guys!

I am using gameLocal.RadiusDamage( position, this, this, this, this, "custom_damage", scale); as part of weapon code. scale is calculated dynamically and varies between 0 and ~12. The RadiusDamage is applied multiple times and could therefore hit a monster a few times before and after it is dead.

The custom_damage is pretty simple:

entityDef custom_damage {
"damage" "10"
"radius" "25"
"knockback" "200"
"push" "300"
"attackerDamageScale" "0"
"attackerPushScale" "0"
"gib" "0"
}

most of the time everything works just fine, but now and then monsters freeze instead of dying - sometimes even in mid-air.

Did anybody come across a problem with such freezing monsters before?

Thanks alot!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 26, 2006 2:41 pm 
Offline
Quad Damage!
User avatar

Joined: Tue Jun 22, 2004 6:57 pm
Posts: 4992
Location: Green Bay, WI
yes.

i once made this wierd tool that i used to push objects around a map. it used radiusDamage, but there wasn't any damage just a little push applied every frame.

it worked great. i could push objects/ragdolls around like i was holding an invisible 10 foot pole. if i could get it under a ragdoll, i could even lift them straight up into the air.

and then sometimes they would freeze and not fall back down.

this has to do with d3's physics code on articulated figures. if it does not detect any fignificant movement, it halts all physics on that figure- even gravity.

don't know why it doesn't happen more in the game, but with this tool i was able to make ragdolls freeze in midair all the time.

_________________
Don't take the swine flu shot!


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Sun Feb 26, 2006 9:11 pm 
Offline
picked up 200 ammo

Joined: Sun Jan 30, 2005 10:59 am
Posts: 278
So I might be able to fix this by giving the monster a little push everytime it becomes a ragdoll. Thanks for the info!


Top
 Profile  
 
 Post subject: Re: monsters freezing in mid air instead of dying
PostPosted: Sun Feb 26, 2006 10:16 pm 
Offline
Quad Damage!
User avatar

Joined: Tue Jun 22, 2004 6:57 pm
Posts: 4992
Location: Green Bay, WI
hellborg wrote:
Did anybody come across a problem with such freezing monsters before?


i think what you are seeing is the monster dieing, but instead of falling downl, the ragdoll freezes right away.

i got this to happen all the time with ragdolls BY using the push k/v in a damage definition. in every frame, i would spawn a small radiusDamage 200 units in front of me but without the damage. plus i could aim it with the mouse. it acted more like a forcefield or something.

it looked cool, until a ragdoll would freeze in mid air and just hang there.

i wonder if it had to do with the lack of collisions. maybe the physics engine could tell it was not touching anything so it halted the physics.

i dunno...

_________________
Don't take the swine flu shot!


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 7:29 am 
Offline
picked up 200 ammo

Joined: Sun Jan 30, 2005 10:59 am
Posts: 278
I played around with this a bit more, and certainly using

monster.becomeRagdoll();
dir=monster.getLinearVelocity();
if(dir_z>0) dir_z=dir_z+100;
if(dir_z<=0) dir_z=dir_z-100;
monster.setLinearVelocity(dir);


stops the freezing. The only problem is, if the monster senses the same damage shortly afterwards, it freezes again. I can also prevent this from happening if I always apply this force, which is a bit expensive performance wise. So, I would only need to find a way to detect, if the monster is in this wierd state...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group