|
Paladin Pinion
The other one of 10
Join date: 3 Aug 2007
Posts: 191
|
04-15-2009 15:22
I'm unclear on the differences between llGroundRepel and llSetHoverHeight. In particular, what does the wiki mean when it says for groundRepel "if the object is within height * 0.5 of ground level"? Does that mean nothing happens if it's higher than half the specified height?
I have an object that hovers fine using llGroundRepel as long as it's on real ground, but if I put it on a platform it doesn't hover any more. So I suspect I need to use llSetHoverHeight instead, but I'd like to know what the differences are.
Also, if I use llSetHoverHeight, do I need to recalculate the distance from the "real" ground periodically during a hover? The effect I'm after is not to maintain a strict height, but rather to follow the land contours approximately. If it's on a platform, then of course it can maintain a level height offset relative to the platform.
What would be the best way to accomplish this?
|
|
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
|
04-15-2009 16:03
While I haven't used these funcs (due to "Do not use with vehicles"  , it looks to me as if llGroundRepel() only kicks in when the elevation is below half the desired height (allowing free movement / gravity above), and llSetHoverHeight() seeks to the specified level at all times. Neither of them take prims into account, so you'll have to actively rely on collisions for that part. Perhaps some invisible "wheels" could be added, to give a small hover effect over prims. As for following ground contours, you can get the ground level ahead of you with llGround() and the associated funcs (llGroundSlope(), etc) and seek accordingly by your propulsion method of choice. (impulse, movetarget, etc) ~Boss
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
04-15-2009 16:14
From: Boss Spectre While I haven't used these funcs (due to "Do not use with vehicles"  , it looks to me as if llGroundRepel() only kicks in when the elevation is below half the desired height (allowing free movement / gravity above), and llSetHoverHeight() seeks to the specified level at all times. I have used llGroundRepel recently and yes, that's how it works. It's only operable within height * 0.5 of the real ground, where llSetHoverHeight works at any elevation (apparently). Be sure to set the flag to indicate whether you want to ignore or not ignore water (the real water table, not prim water) or you'll float along the bottom of a pond. I only used llGroundRepel one time, but it seemed to follow ground contours well enough.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
04-16-2009 00:39
I believe that llSetHoverHeight() does have SOME limitations. Like llMoveToTarget(), I think it might have some difficulty if the target elevation is too great a difference from the current actual elevation. So if you are at 100m elevation trying to reach 1000m elevation, it may not work well. Not too sure though; been a while since i messed with it.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
04-16-2009 05:17
Hewee is correct, they work by hovering over the point directly under the location of the object, not over the average ground level under the object. So if you are going up a very steep hill you will bump into it.
Should a hover vehical be able to scale a vertical wall? No. Should a hover vehical be able to scale a near vertical wall? Depends how shear it is.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Paladin Pinion
The other one of 10
Join date: 3 Aug 2007
Posts: 191
|
04-16-2009 14:17
Thanks very much to all, I understand the distinctions much better now. I think I'll continue to use llGroundRepel, but before I set the target height I'll calculate the distance from the starting position to the ground and add that to the target height. That should account for platforms.
I didn't know about the limitations in llSetHoverHeight. In this case, if my object happens to get stopped by a cliff, it won't matter too much. I think Strife is right that a hover toy shouldn't be expected to climb vertical walls.
|
|
Taeas Stirling
Registered User
Join date: 4 Sep 2004
Posts: 74
|
04-16-2009 15:30
its been my experience that the most realistic moving hovercraft are made with a simple car vehicle script and a transparent base plate.
|