1 registered members (TipmyPip),
18,466
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Colllision events in Physics
#28504
06/07/04 16:36
06/07/04 16:36
|
Joined: Jan 2004
Posts: 107 India
Lord_RazermanX
OP
Member
|
OP
Member
Joined: Jan 2004
Posts: 107
India
|
In the normal A5 engine lets say if a ball collided with a wall a sound was produces via an event_impact, now I want the ball to produce sounds while colliding with the wall or the floor but just when it collides , it should not happen that when the ball rests on the floor it keeps playing a sound, how do I achiev this for Physics object. Is it done by enable_poly.. if yes can someone please show me a small snippet of a collision sound or something relevant , Thanks.
Our team is looking for prospective members.
Intermediate skills are minimum, No amateurs.
Our team can have members from anywhere ,so
long theres an international bank around 
We need a modeller,2d artist and level designer
|
|
|
Re: Colllision events in Physics
[Re: Lord_RazermanX]
#28506
06/07/04 21:57
06/07/04 21:57
|
Joined: Jan 2004
Posts: 107 India
Lord_RazermanX
OP
Member
|
OP
Member
Joined: Jan 2004
Posts: 107
India
|
I can do that , but if you do it for a lot of objects , a lot of calculations are added every second, for one object no performance probs but what about a lot of them, also if the ball is moving on the ground(not bouncing) a sound must not be produced, is there any other way?
Our team is looking for prospective members.
Intermediate skills are minimum, No amateurs.
Our team can have members from anywhere ,so
long theres an international bank around 
We need a modeller,2d artist and level designer
|
|
|
Re: Colllision events in Physics
[Re: ventilator]
#28509
06/08/04 00:14
06/08/04 00:14
|
Joined: Mar 2003
Posts: 4,427 Japan
A.Russell
Expert
|
Expert
Joined: Mar 2003
Posts: 4,427
Japan
|
I'm going to have this same problem shortly.
I haven't tried this, but I suspect it should work. When your object is rolling on a surface it should be colliding with it all the time, or nearly all the time, and when it is bouncing there should be intervals between collisions. Check for collision, and if positive play sound and set a flag. Then see how long it takes before it returns false. Don't play the sound again until there hasn't been a collision with the same object for a reasonable time ( a few frames or whatever, experiment).
And if you get it working before I do, please let me know
(I haven't figured out how to check for collision with physics objects. I've always used ent_move for this. If someone could shed some light on how it is done)
Last edited by A.Russell; 06/08/04 00:23.
|
|
|
Re: Colllision events in Physics
[Re: fastlane69]
#28511
06/08/04 22:15
06/08/04 22:15
|
Joined: Jan 2004
Posts: 107 India
Lord_RazermanX
OP
Member
|
OP
Member
Joined: Jan 2004
Posts: 107
India
|
The problem is just the floor , wall are easy , since you can treat them as entity but floor is tough. I dont know how to use event_friction yet , it seems my manual is outdated since I am not getting any help there, is this covered in the new manual, so I will download it.
Second , yes this seems to be a good solution that as long as the object has vertical speed and it collides, sounds of varying intensities may be produces, this is actually working to some extent, but the problem still exists.
I will work on this code if, I manage to get it right, I will post it here. Thanks guys.
Our team is looking for prospective members.
Intermediate skills are minimum, No amateurs.
Our team can have members from anywhere ,so
long theres an international bank around 
We need a modeller,2d artist and level designer
|
|
|
Re: Colllision events in Physics
[Re: Lord_RazermanX]
#28512
06/10/04 15:34
06/10/04 15:34
|
Joined: Jan 2004
Posts: 107 India
Lord_RazermanX
OP
Member
|
OP
Member
Joined: Jan 2004
Posts: 107
India
|
Just an update, this is a real tough cookie. If i use threshold z velocities I have 2 problems, the velocities differ for different heights owing to gravitiation acceleration , second , the phent_getvelocity fucntion for every frame brings down the frame rate by upto 15 % max.Did someone else gat a code to achiee this?
Our team is looking for prospective members.
Intermediate skills are minimum, No amateurs.
Our team can have members from anywhere ,so
long theres an international bank around 
We need a modeller,2d artist and level designer
|
|
|
Re: Colllision events in Physics
[Re: Lord_RazermanX]
#28513
06/10/04 20:19
06/10/04 20:19
|
Joined: Mar 2003
Posts: 5,377 USofA
fastlane69
Senior Expert
|
Senior Expert
Joined: Mar 2003
Posts: 5,377
USofA
|
Quote:
the velocities differ for different heights owing to gravitiation acceleration
This should obviously not be. I too have had problems with an inconstant gravity, but haven't had to time to track it down. In my case, my falling velocity rate was constant and then strated fluctuating as I got closer to the ground. Naturally, gravity should remain constant at thus I should gain a constant amount of Velocity each second. What I observed is that the rate DECREASED as I got closer to the ground. Again, haven't had time to fully investigate this, but as I recall, I had no code except PE in my drop and thus to me this was a PE problem.
Quote:
the phent_getvelocity fucntion for every frame brings down the frame rate by upto 15 % max
I've had up 100 entities all registered with the PE and all geting velocity and I noticed no major frame drop (stayed at 58-60 the whole time).
|
|
|
|