Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

collisions not working at angles

Zaplok Riggles
Registered User
Join date: 25 Feb 2008
Posts: 119
03-05-2008 06:42
I am doing some testing with collisions. I have a large square thin object. I put a collision_start event on it and fire a gun at it. If I am straight on, the collisions get detected. If I am at an angle, but close, collisions get detected. If I am at an angle but a little bit away, the bullet passes visually through my object but no collision_start is getting called. If you stand behind the object, you actually see the bullets pass right through. If I walk closer or change my angle, the bullets hit my object (and stop as most bullets die on impact).

Ideas on this? I know the script is coded properly as it does detect the other collisions.
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
03-05-2008 10:39
Is the object you're firing at phantom?

If you are firing bullets at something and the bullets aren't bouncing off, and instead are going straight through, then the physics engine isn't detecting the collision at all, so the script can't either. Is that what's happening?

Have you tried it in Havok 4?
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Zaplok Riggles
Registered User
Join date: 25 Feb 2008
Posts: 119
03-05-2008 10:51
From: Seifert Surface
Is the object you're firing at phantom?

If you are firing bullets at something and the bullets aren't bouncing off, and instead are going straight through, then the physics engine isn't detecting the collision at all, so the script can't either. Is that what's happening?

Have you tried it in Havok 4?


The bullets do hit and collision is detected if firing from a different angle. It's not that the object isn't physical. I think it may have something to do with the bullet firing quickly and "jumping through" my solid object due to the speed of the projectile v.s. how often collisions are detected. The bullet isn't getting a collision either. But again, if shot straight on or at a different angle, the bullet and target both get valid collision detection events.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-05-2008 13:03
This is the same quirk that allows people to move through solid objects using high-speed physical movement (there are a number of products out there that boast this feature, like OmniPhase and TeleDash), and it still very much happens in Havok 4 (at least as of a couple weeks ago), though I'm not sure if the specifics, such as how fast and what kind of thicknesses will trick the engine, are the same. I don't know if that is still due to limitations in the physics engine, or if it was purposefully reintroduced as a design feature by LL, or what.
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
03-05-2008 14:22
Take your projectile's speed and divide it by 45, that's how many meters it moves each tick. Objects collide if they would be intersecting on the next tick. A projectile 5.555 meters long can travel at 250 meters per second without going through anything.
_____________________