Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Non-Push bullet still orbits at random.

Sean Martin
Yesnomaybe.
Join date: 13 Sep 2005
Posts: 584
06-01-2007 18:04
I have not done much scripting with bullets or weapons.
But obviously almost everyone knows there are certain shapes useful for orbiting. However I need the exact opposite.
I need to know the best way to keep a non-push bullet from orbiting a physical object by accident.
The bullet I use is not scripted to do this but once in awhile it gets a lucky hit on a vehicle.
This is for a simple combat system.

Any special shapes or technique that may help prevent this?
Thanks ;)
_____________________
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
06-01-2007 18:16
Well, spherical shapes tend to make the physics engine happier, but tanks are not generally too spherical. While it may cause other complications, have you tried surrounding the tank with an invisible spherical "collision barrier"?

It still will likely react unpredictably once in a while, but that might cut down on it a bit, if you can manage the other issues with doing it that way.
Sean Martin
Yesnomaybe.
Join date: 13 Sep 2005
Posts: 584
06-01-2007 18:39
From: Talarus Luan
Well, spherical shapes tend to make the physics engine happier, but tanks are not generally too spherical. While it may cause other complications, have you tried surrounding the tank with an invisible spherical "collision barrier"?

It still will likely react unpredictably once in a while, but that might cut down on it a bit, if you can manage the other issues with doing it that way.

The bubble would be nice but I'm unable to do this because the vehicles need to detect which part the bullet hits. It does different types of simulated damage to the systems.

I thought maybe a phantom bullet using llVolumeDetect would work?
I'm not sure. I wouldn't think the vehicle would register the hit though.
Also the bullets need to detect the vehicle to send a code confirming the hit was from that bullet. So the volume detect would need to go both ways. I'm not sure if that will even work because the bullets would pass through the entire vehicle causing all kinds of simulated chaos since the internal prims would be hit easily.


I tried smaller bullets since they don't move as fast anyway. That seems to make it even worse. :confused:
And larger bullets still orbit once in awhile. And to add, they hit a wide area and for that reason can not be as accurate. So i'm stumped. lol
I really don't want to use sensor based bullets for lag reasons and the fact they just don't simulate combat well in my opinion. Partical bullets look like they miss yet register as a hit. Then there is the detecting each prim and damage type. Eck. :o
_____________________
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
06-01-2007 18:45
/me thinks that what you want to do is beyond the design limitations of SL. ;)
Sean Martin
Yesnomaybe.
Join date: 13 Sep 2005
Posts: 584
06-01-2007 20:05
Well I changed the bullets to a sphere and it seems to do ok.
Until I get too close.
Apparently if a bullet rezes within the other vehicle then off it goes into the clouds.
_____________________
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
06-01-2007 20:26
Yeah, the physics solver is not continuous, unfortunately, so objects moving at high rates of speed will interpenetrate, and sometimes go right through one another without triggering any kind of collision. The Lag Monster makes that situation even worse. I have fired a 0.25m sphere at a solid 10m^3 cube, and had it go right through the cube without registering a collision. Phantom without the phantom flag. :P
Zenick Aridian
Registered User
Join date: 1 Nov 2005
Posts: 8
06-02-2007 10:17
Not sure if it would work but you could try having the bullet go phantom and non-physics when it hits a object.
Sean Martin
Yesnomaybe.
Join date: 13 Sep 2005
Posts: 584
06-03-2007 04:52
From: Zenick Aridian
Not sure if it would work but you could try having the bullet go phantom and non-physics when it hits a object.

Yeah I ended up doing this too and it worked well. Except if I had the non-physics go first. That seemed to increase the orbiting. But phantom works much better.
I ended up having to move the actual weapons farther back to prevent the initial rez from appearing inside an opponent vehicle. (If they happened to be too close.)
If I divide the rez distance to be closer to the barrel then I end up orbiting myself. So it's just one of those things I guess.
_____________________
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
06-03-2007 05:25
Kind of related in this, but I've created an attack effect which I would like to have causing damage (in damage sims). The effect itself is entirely particle based so the damaging bullets don't need to be visible.
The attack however I don't want to sent people flying, at most I want them knocked back a little or to the side so that the damage can hit people behind them as well.

My thinking is a large cone or maybe pyramid angled towards the target that should push them a little to the side as it applies damage and disappears. But I want to be sure what I'm making isn't going to randomly orbit someone, as it's intended mainly as a special effect which happens to be useful in combat sims to cause some moderate damage and look helluva cool.
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)