mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
add high level code suport for SetHoverHeight() called from a attachment, so in future physics engines can also suport it
This commit is contained in:
@@ -2579,7 +2579,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="tau">Number of seconds over which to reach target</param>
|
||||
public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
|
||||
{
|
||||
PhysicsActor pa = RootPart.PhysActor;
|
||||
PhysicsActor pa = null;
|
||||
if(IsAttachment)
|
||||
{
|
||||
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
|
||||
if (avatar != null)
|
||||
pa = avatar.PhysicsActor;
|
||||
}
|
||||
else
|
||||
pa = RootPart.PhysActor;
|
||||
|
||||
if (pa != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user