mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Somewhat improve avatar region crossings by properly preserving velocity when avatar enters the new region.
This commit addresses the following issues were causing velocity to be set to 0 on the new region, disrupting flight in particular * Full avatar updates contained no velocity information, which does appear to have some effect in testing. * BulletSim was always setting the velocity to 0 for the new BSCharacter. Now, physics engines take a velocity parameter when setting up characters so we can avoid this. This patch applies to both Bullet and ODE.
This commit is contained in:
@@ -80,10 +80,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
||||
return prim;
|
||||
}
|
||||
|
||||
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
|
||||
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying)
|
||||
{
|
||||
BasicActor act = new BasicActor(size);
|
||||
act.Position = position;
|
||||
act.Velocity = velocity;
|
||||
act.Flying = isFlying;
|
||||
_actors.Add(act);
|
||||
return act;
|
||||
|
||||
Reference in New Issue
Block a user