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
