Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problem with land_collision(vector pos)

AnnMarie Otoole
Addicted scripter
Join date: 6 Jan 2007
Posts: 162
10-26-2008 20:03
How come I'm getting land_collision events when the vehicle is at least 75 m above land?

Does it have anything to do with vehicle size? (30m x 15m x 15m).
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
10-26-2008 21:20
Haven't heard that one before..

Does it happen only in one specific spot or pretty much anywhere?
AnnMarie Otoole
Addicted scripter
Join date: 6 Jan 2007
Posts: 162
10-26-2008 22:29
Pretty much anywhere so far as I can see.

It has balloon style auto height above ground control but the land_collision function was included so that it can correct for vertical cliffs where the auto altitude has not had time to respond. It works as intended except it is acting like it is about 50 m lower than it is and bumping mounds in the ground.

If it starts off about 5m above ground, I get a series of ground collisions until it gets to about 60 m above ground, each collision moving it up 5m.

I may have to extract just those functions and see if I can reproduce it in a simple cube.
AnnMarie Otoole
Addicted scripter
Join date: 6 Jan 2007
Posts: 162
10-27-2008 01:32
I think I've found the explanation if anyone needs it.

I was using a small mega prim. 30x10x10. Megaprims are somehow trimmed out of much larger mega prims. Even though the "center" of the prim was in the center of the visible object, its interference range with the ground and other objects extends at least 30 m beyond its apparent limits, presumably corresponding to the object shape from which it was extracted.

Since it was physical it must be extending the Havoc 4 repelling range out of all proportion to the apparent relative size and causing collisions.
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
10-27-2008 06:00
...and I was just about to say that mega prims and physics do not play nice.
_____________________
So many monkeys, so little Shakespeare.