How to use different "gravity" for some entities i
How to use different "gravity" for some entities i
Hello,
I am stuck with a problem and ask for your help.
Using Ivana Gibson´s TUT for kickable gibs, I am not happy with the gib behaviour.
Gibs are using MOVETYPE_BOUNCE (as defined in players.qc).
I feel like the bouncing is too much like "pingpong" for the heavy gib pieces.
Thats why I searched for a way to increase their weight by increasing the gravity for them.
There is a code in Mission Pack 2 (example: antigrav_belt):
self.gravity = 0.25;
Trying this line in Quake 1.06 source failed due to "unknown value" error.
My questions:
Is the "gravity" a new value, introduced in Mission pack 2 ?
How could I implement it into Quake ?
I searched through all Mission Pack 2 .qc files, but didnt find the definition for "gravity".
Setting the complete map gravity (via engine cvar): sv_gravity 1500
looks perfect for the gib behaviour, but of course everything else is affected by the new gravity (what I dont want)
Thank you very much for your help.
Seven
PS: I played with the gibs velocity values a long time and found the best settings so that they are not kicked so far and high.
Now all that is left is to reduce the "bouncing" behaviour for them.
I know that MOVETYPE_TOSS could be used for them, but this has no bouncing at all (what I dont want as well).
I am stuck with a problem and ask for your help.
Using Ivana Gibson´s TUT for kickable gibs, I am not happy with the gib behaviour.
Gibs are using MOVETYPE_BOUNCE (as defined in players.qc).
I feel like the bouncing is too much like "pingpong" for the heavy gib pieces.
Thats why I searched for a way to increase their weight by increasing the gravity for them.
There is a code in Mission Pack 2 (example: antigrav_belt):
self.gravity = 0.25;
Trying this line in Quake 1.06 source failed due to "unknown value" error.
My questions:
Is the "gravity" a new value, introduced in Mission pack 2 ?
How could I implement it into Quake ?
I searched through all Mission Pack 2 .qc files, but didnt find the definition for "gravity".
Setting the complete map gravity (via engine cvar): sv_gravity 1500
looks perfect for the gib behaviour, but of course everything else is affected by the new gravity (what I dont want)
Thank you very much for your help.
Seven
PS: I played with the gibs velocity values a long time and found the best settings so that they are not kicked so far and high.
Now all that is left is to reduce the "bouncing" behaviour for them.
I know that MOVETYPE_TOSS could be used for them, but this has no bouncing at all (what I dont want as well).
gravity was new in 1.07 (and all ports support it). if you try gravity in 1.06 or earlier, it'll just be regular gravity
All you have to do is stick this on the end of defs.qc
NOW YOU CAN USE GRAVITY!
All you have to do is stick this on the end of defs.qc
Code: Select all
.float gravity;
i should not be here
Supa & leileilol,
things are so easy, once kind and experienced people like you explain it
With your help I could make it work in Quake 1.06.
Now the gibs have the correct "weight".
I heard about Quake 1.07 / 1.08 many times but never found a source from it. Wonder if it exist.
Thank you again for your swift replies !
Seven
things are so easy, once kind and experienced people like you explain it
With your help I could make it work in Quake 1.06.
Now the gibs have the correct "weight".
I heard about Quake 1.07 / 1.08 many times but never found a source from it. Wonder if it exist.
Thank you again for your swift replies !
Seven
I'm well aware of Newtons laws - it was the OPs verbiage that threw me.
"Thats why I searched for a way to increase their weight by increasing the gravity for them. "
Anyway, if the gibs are flying off too hard, wouldn't you want to reduce the inital velocity, instead of increasing gravitational decay?
"Thats why I searched for a way to increase their weight by increasing the gravity for them. "
Anyway, if the gibs are flying off too hard, wouldn't you want to reduce the inital velocity, instead of increasing gravitational decay?
Weird, never new about the .gravity field, though I think it would look ODD if one object fell faster than another if pushed off a ledge. Like if I assigned player.gravity = 1000 to someone holding a flag. versus a normal player at 800 gravity. In real life both would fall at same rate, i havent tested this field though i would assume the 'heavier' player would drop faster.
If you want to slow the velocity of an item based on it's "MASS" just do something like the watermove code does
change self.waterlevel to the value of your mass ??
Sure it's not college level physics but it will work close enough...
If you want to slow the velocity of an item based on it's "MASS" just do something like the watermove code does
Code: Select all
self.velocity = self.velocity - 0.8*self.waterlevel*frametime*self.velocity;
Sure it's not college level physics but it will work close enough...
Re: How to use different "gravity" for some entities i
Hello,
sorry for bumping this old thread.
But I think this information is maybe interesting for others as well.
I found a maybe better way to deal with "gravity" behaviour for entities, that shall bounce.
(that was my initial issue in this thread)
For DP users, you can make use of this dpextensions feature:
DP_SV_BOUNCEFACTOR
I know, this is old news for many of you, but the reason why nobody suggested it that time
when this thread was born made me think that not everybody is aware of it.
That is all I wanted to say
Thank you again for helping me back in april this year.
Kind regards,
Seven
sorry for bumping this old thread.
But I think this information is maybe interesting for others as well.
I found a maybe better way to deal with "gravity" behaviour for entities, that shall bounce.
(that was my initial issue in this thread)
For DP users, you can make use of this dpextensions feature:
DP_SV_BOUNCEFACTOR
I know, this is old news for many of you, but the reason why nobody suggested it that time
when this thread was born made me think that not everybody is aware of it.
That is all I wanted to say
Thank you again for helping me back in april this year.
Kind regards,
Seven