Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Physical object disappears when crossing a land border....

a lost user
Join date: ?
Posts: ?
08-26-2005 05:26
I made a little cannon that fires a physical cannonball depending on angle and velocity, so far it works fine.

The cannonball has a land_collision start and collision_start detection and on collision it dies after rezzing a little invisible effect for sound and particle explosion which dies too after 2.6 seconds.
As long as it hits on my own land, working fine, also firing at a building beside my land directly all is wel (the Building start directly on the land border, so the bullet not needs to go far into the neighbour land.
When I shoot with higher velocity or angle to shoot for example onto my other neighbours land (which is empty and bullet should collide with the ground there), the cannonball disppears when it is still in the air in the moment it crosses landborder, or when it hits the ground in a low angle it seems just to fall into ground and not raise a collision event.

Does anyone have an idea why and / or a solution for that ?
a lost user
Join date: ?
Posts: ?
Addition
08-26-2005 12:01
Have now also seen that the object disappears also when I drop it from Inevntory and the range from avatar to the drop place seems to be exceeding 20 meters.

How can I rez an object with velocity that flies away and stays 'alive' after 20 meters or more distance drom the rezzing location ?
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
08-26-2005 13:34
I'm not exactly sure what the difficulties are but I'll give you a few hints that might make things easier.

The rez-into-air from inventory is problematic as items don't like to dragged from the folder into the air, probably because the question of "where?" is a little hard to define. Furthermore, an llRezObject will silently fail for a rez greater than 10m from the calling object.

Objects rezzed with llRezObject have the STATUS_DIE_AT_EDGE property set by default as noted on llSetStatus which causes object to die at sim borders. Furthermore, temp_on_rez objects have a max lifetime of 80 seconds which you may want to check for.

Rezzing another object to handle the collision effects is unnecessarily expensive; look into calling llSetTimerEvent() in your collision events and the original object can handle the collision effects.

I hope this helps some.
Synergy Belvedere
Prim Reaper
Join date: 7 Jul 2004
Posts: 253
08-26-2005 14:53
As well, setting the canon ball to a 'light' material also increases the distance it can be seen :)
_____________________
----------------------------------------------------------
--The mind's eye is limited only by its focus--
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
08-26-2005 18:12
A while back I made a cannonball (large, metal, physical, no propulsion) that would send me a scubbie report every three seconds, after thirty seconds it would die.
I am usually able to clear three or four sims with and get readings from all of them. I
I have been able to get from balls my workdeck in Behrii to the landbridge. Occassionally they will 'go offworld'. for no apparent reason. i'm going to have to make it 'explode' real nice particlewize on impact later.

But this is just a gag for taking readings of sims I might be about to enter with rather large, prim-dense airship, and want to make sure I'll be able to, say, MOVE. I also need the ability to count the amount of available prims on a parcel/sim so I know if my ship will unlink itself on a border crossing or not.
_____________________
Wheel Fizz
Registered User
Join date: 26 May 2005
Posts: 36
08-26-2005 19:48
From: someone
But this is just a gag for taking readings of sims I might be about to enter with rather large, prim-dense airship, and want to make sure I'll be able to, say, MOVE. I also need the ability to count the amount of available prims on a parcel/sim so I know if my ship will unlink itself on a border crossing or not.


Thats such a cool idea sort of Sim Stat Weather Balloon Scout Cannonballs.....:)
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
08-26-2005 19:53
From: Wheel Fizz
Thats such a cool idea sort of Sim Stat Weather Balloon Scout Cannonballs.....:)


Yeah. Next Step: Rapid-Fire so I can take multiple averaged readings and/or pelt the telehub with physics.
_____________________
a lost user
Join date: ?
Posts: ?
08-28-2005 11:49
From: Malachi Petunia
I'm not exactly sure what the difficulties are but I'll give you a few hints that might make things easier.

The rez-into-air from inventory is problematic as items don't like to dragged from the folder into the air, probably because the question of "where?" is a little hard to define. Furthermore, an llRezObject will silently fail for a rez greater than 10m from the calling object.


Hum, the ball is rezzed in a distance of it's own diameter+ 5cm beside the cannon axis that contains the script, with a velocity when rezzed using angle theta for in world direction and angle phi for the vertical velocity, it is definitely within the rangle of 10 meters.
I calculate the needed velocity like this:

velx = (cos theta * sin phi) * power [m/s]
vely = (sin heta * sin phi) * power [m/s]
velz = cos phi * power [m/s]

power is a value I set with a command, theta is the rotation angle in the x/y plane and phi the angle of thew cannon axis (cannon up or down).
The cannonball self turn from physical to non-physical object on collision, to sta yin place and create a particle explosion, then dies after a timer of 2.6 seconds.

when I use for example a very low value for power, maybe 10-15, the rezzed ball flies away in a short radius, hitting ground about 10 meters away, this works, also the collision on ground, making a particle explosion.

The odd thing is when I raise the power over 20-25, the ball flies away, hits ground maybe in a distance > 20m, then no collision is detected.
It seems the whole ball disappears after a distance of 20 meters, when I set poweer to 40 maybe and it is on top of it's flight path when crossing the 20 meters, it just is 'gone'.

On a power setting of 40 it should hit the ground in about 40 meters distance from rezzing point, which is still in my viewing range. At Least I should be able to see the particke explosion that makes an explosion of about 15 meters diameter...

Problem so is when the velocity is high enough to fly farther away than 20 meters, the ball becomes invisible and no ground collision is detected.

>>>
I added a timer into the cannon ball's on_collision events too, but this seems to have no effect, also making it a light object as suggested doesn't change this behaviour :(