Collision I/O

Avatar
gallardo
85 Posts
Posted Dec 02, 2012
Hello everyone,
I'm trying to have a prop_phys that fires an output when it collides with other objects or wall/ceiling/floor.
At the moment (plan B), I have my prop_phys that breaks and fires OnBreak, and it's ok like this, except the object doesn't always break.
If the collision is too gentle or in other conditions, the object remains intact.

So my questions:
1) is there something similar to an "OnCollision" output?
2) if not, is there a way to make an obj break in any case?

Thanks!

Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Dec 02, 2012
Replied 1 hour later
What about parenting a trigger brush to your prop_physics with the flag "physics objects" checked? Ten you can send the Onbreak output via the trigger to the prop_physics :wink:
Avatar
gallardo
85 Posts
Posted Dec 02, 2012
Replied 36 minutes later
Mmm, not sure I've understood.
Do you mean a func_brush?
If yes, I think you mean the solidBSP key to check...
If yes, func_brush has no OnBreak..
But I bet I've understood nothing, sorry
Avatar
gallardo
85 Posts
Posted Dec 02, 2012
Replied 2 minutes later
Ok, maybe you meant to use a trigger_multiple parented to the object, with the flag to filter other physic objects.
In that case, I still cannot detect when the object hit the scenery.
Avatar
josepezdj
2,386 Posts
Posted Dec 03, 2012
Replied 18 hours later
Hi. Yes I meant whatever trigger brush, like for example the trigger_multiple.

I never checked about this, but if you say that the flag cannot detect models without a collision model, then I'd suggest you to try a func_clip_vphysics around the props that hasn't got collision model (I hope there are not many in your level :biggrin:), maybe the clip is detected by the "Physics objects" flag.

In order to know which props has/hasn't got a collision model, just check in the nmodel viewer (inside hammer I mean > World model property) and check the box beside "collision model". It'll show a mesh made of red thin lines defining the collision model that the model has. If it doesn't show anything it's because it hasn't got any collisions :wink:

Avatar
CamBen
973 Posts
Posted Dec 03, 2012
Replied 6 hours later
Just parent the physics object to a glass futbol, that thing always breaks. If it has an onbreak command, then:
Onbreak prop_physics(name) break
Avatar
Skotty
671 Posts
Posted Dec 15, 2012
Replied 12 days later
To make a prop_physics break always, I use the following tricks:
**
Flags:**
Break on Touch
Break on Pressure

Keyvalues:
Impact damage type: Sharp
Override Parameters: health,1

Advertisement
Registered users don’t see ads! Register now!
Avatar
gallardo
85 Posts
Posted Jun 08, 2013
Replied 5 months later
Hello there,
I just returned to my map and unfortunately this trick doesn't work :sad:

To recap a bit, I'm trying to have a prop_phys that fires an output when it collides with other objects or wall/ceiling/floor.
The current approach uses a phys_object spawned at a certain speed and without gravity that breaks on collision.
it happens that if it collides with an almost parallel trajectory, it doesn't break and bounce away instead.
I'd like to avoid this behaviour but I don't know how.

Any idea?
Thanks again