Talk:Point angularvelocitysensor: Difference between revisions
mNo edit summary |
Angry Beaver (talk | contribs) mNo edit summary |
||
Line 5: | Line 5: | ||
Hmm, I'm trying to increase/reduce the pitch of a sound depending on the angular speed of a given func_physbox constrained to a phys_hinge and since it's a sound, I can't stop the pitch from beeing changed. You could possibly code something yes, but I believe it wouldn't be useful for a standard HL2 map.. and I don't want to make a mod, this is just a map. The thing is that it works somewhat great, but due to the overwhelming amount of outputs sent by the point_angularvelocitysensor, the ambient_generic doesn't know how to deal with it and the inputs are treated in a chaotic order. | Hmm, I'm trying to increase/reduce the pitch of a sound depending on the angular speed of a given func_physbox constrained to a phys_hinge and since it's a sound, I can't stop the pitch from beeing changed. You could possibly code something yes, but I believe it wouldn't be useful for a standard HL2 map.. and I don't want to make a mod, this is just a map. The thing is that it works somewhat great, but due to the overwhelming amount of outputs sent by the point_angularvelocitysensor, the ambient_generic doesn't know how to deal with it and the inputs are treated in a chaotic order. | ||
I tried to use several point_angularvelocitysensor with the OnGreaterThan and OnLesserThan outputs, but it doesn't work because : when the physbox is turning at a speed of 150 degrees per second, it triggers the angularvelocitysensor for the "10 degree step", the "20 degree step", the "30 degree step", and so on.. --[[User:NykO18|NykO18]] 17:35, 7 Jun 2007 (PDT) | I tried to use several point_angularvelocitysensor with the OnGreaterThan and OnLesserThan outputs, but it doesn't work because : when the physbox is turning at a speed of 150 degrees per second, it triggers the angularvelocitysensor for the "10 degree step", the "20 degree step", the "30 degree step", and so on.. --[[User:NykO18|NykO18]] 17:35, 7 Jun 2007 (PDT) | ||
Theres no possibly about the coding a fix I know exactly what I'd do, the entity would gain a frequency property and then if it tried to fire before the frequency timer had elapsed then it wouldn't fire. but thats neithier here nor there as it doesn't help inside regular HL2 DM. As for fixing your problem directly why not force the engine to slow it down... use a [[math_counter]] SetValueNoFire it with the new number to be used. Then using a [[logic_timer]] Add 0 at a given time preiod. The math_counter will be set up so it OutValues to the sounds pitch, it wont fire before hand as we were SetValueNoFire which doesn't trigger OutValue. It wont deal with the chaotic order thing well but at least it will smooth out what the player hears. --[[User:Angry Beaver|Angry Beaver]] 23:49, 7 Jun 2007 (PDT) |
Revision as of 23:49, 7 June 2007
The AngularVelocity output of the point_angularvelocitysensor is fired like ten times per millisecond when the angular velocity changes. Does someone has an idea on how to prevent it from flooding the engine ? --NykO18 16:21, 7 Jun 2007 (PDT)
maybe you could include a logic_timer thats your sampling frequency and just disable the target entity cause it looks like this doesn't have an enable/disable to target it directly... I'd code you a fix but that may not work depending on what your doing. --Angry Beaver 16:28, 7 Jun 2007 (PDT)
Hmm, I'm trying to increase/reduce the pitch of a sound depending on the angular speed of a given func_physbox constrained to a phys_hinge and since it's a sound, I can't stop the pitch from beeing changed. You could possibly code something yes, but I believe it wouldn't be useful for a standard HL2 map.. and I don't want to make a mod, this is just a map. The thing is that it works somewhat great, but due to the overwhelming amount of outputs sent by the point_angularvelocitysensor, the ambient_generic doesn't know how to deal with it and the inputs are treated in a chaotic order. I tried to use several point_angularvelocitysensor with the OnGreaterThan and OnLesserThan outputs, but it doesn't work because : when the physbox is turning at a speed of 150 degrees per second, it triggers the angularvelocitysensor for the "10 degree step", the "20 degree step", the "30 degree step", and so on.. --NykO18 17:35, 7 Jun 2007 (PDT)
Theres no possibly about the coding a fix I know exactly what I'd do, the entity would gain a frequency property and then if it tried to fire before the frequency timer had elapsed then it wouldn't fire. but thats neithier here nor there as it doesn't help inside regular HL2 DM. As for fixing your problem directly why not force the engine to slow it down... use a math_counter SetValueNoFire it with the new number to be used. Then using a logic_timer Add 0 at a given time preiod. The math_counter will be set up so it OutValues to the sounds pitch, it wont fire before hand as we were SetValueNoFire which doesn't trigger OutValue. It wont deal with the chaotic order thing well but at least it will smooth out what the player hears. --Angry Beaver 23:49, 7 Jun 2007 (PDT)