diff options
author | Kitto Flora | 2010-12-20 07:04:35 +0000 |
---|---|---|
committer | Kitto Flora | 2010-12-20 07:04:35 +0000 |
commit | 5fccbe21d68f681b9a5aa0f2ae535a7d61a9a3f4 (patch) | |
tree | 3704952b5d6e66d08c1e2b297e478a078f670e50 /OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-5fccbe21d68f681b9a5aa0f2ae535a7d61a9a3f4.zip opensim-SC-5fccbe21d68f681b9a5aa0f2ae535a7d61a9a3f4.tar.gz opensim-SC-5fccbe21d68f681b9a5aa0f2ae535a7d61a9a3f4.tar.bz2 opensim-SC-5fccbe21d68f681b9a5aa0f2ae535a7d61a9a3f4.tar.xz |
Update materials parameters.
Diffstat (limited to 'OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs')
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs | 200 |
1 files changed, 108 insertions, 92 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs index e1989e2..756c005 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs | |||
@@ -491,43 +491,55 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
491 | 491 | ||
492 | staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; | 492 | staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; |
493 | 493 | ||
494 | // Centeral contact friction and bounce | 494 | // Centeral contact friction and bounce // KF: This appears to be only for static AV on non-phys prim. |
495 | // ckrinke 11/10/08 Enabling soft_erp but not soft_cfm until I figure out why | 495 | contact.surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
496 | // an avatar falls through in Z but not in X or Y when walking on a prim. | 496 | contact.surface.mu = 255.0f; |
497 | contact.surface.mode |= d.ContactFlags.SoftERP; | 497 | contact.surface.bounce = 0.0f; |
498 | contact.surface.mu = nmAvatarObjectContactFriction; | 498 | contact.surface.soft_cfm = 0.0f; |
499 | contact.surface.bounce = nmAvatarObjectContactBounce; | 499 | contact.surface.soft_erp = 1.00f; // If this is too small static Av will fall through a sloping prim. |
500 | contact.surface.soft_cfm = 0.010f; | ||
501 | contact.surface.soft_erp = 0.010f; | ||
502 | 500 | ||
503 | // Terrain contact friction and Bounce | 501 | // Terrain contact friction and Bounce |
504 | // This is the *non* moving version. Use this when an avatar | 502 | // This is the *non* moving version. Use this when an avatar |
505 | // isn't moving to keep it in place better | 503 | // isn't moving to keep it in place better |
506 | TerrainContact.surface.mode |= d.ContactFlags.SoftERP; | 504 | /* TerrainContact.surface.mode |= d.ContactFlags.SoftERP; |
507 | TerrainContact.surface.mu = nmTerrainContactFriction; | 505 | TerrainContact.surface.mu = nmTerrainContactFriction; |
508 | TerrainContact.surface.bounce = nmTerrainContactBounce; | 506 | TerrainContact.surface.bounce = nmTerrainContactBounce; |
509 | TerrainContact.surface.soft_erp = nmTerrainContactERP; | 507 | TerrainContact.surface.soft_erp = nmTerrainContactERP; */ |
508 | |||
509 | TerrainContact.surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; | ||
510 | TerrainContact.surface.mu = 255.0f; | ||
511 | TerrainContact.surface.bounce = 0.0f; | ||
512 | TerrainContact.surface.soft_cfm = 0.0f; | ||
513 | TerrainContact.surface.soft_erp = 0.05f; | ||
510 | 514 | ||
511 | WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM); | 515 | WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM); |
512 | WaterContact.surface.mu = 0f; // No friction | 516 | WaterContact.surface.mu = 0.0f; // No friction |
513 | WaterContact.surface.bounce = 0.0f; // No bounce | 517 | WaterContact.surface.bounce = 0.0f; // No bounce |
514 | WaterContact.surface.soft_cfm = 0.010f; | 518 | WaterContact.surface.soft_cfm = 0.010f; |
515 | WaterContact.surface.soft_erp = 0.010f; | 519 | WaterContact.surface.soft_erp = 0.010f; |
516 | 520 | ||
517 | // Prim contact friction and bounce | 521 | // Prim contact friction and bounce |
518 | // THis is the *non* moving version of friction and bounce | 522 | // THis is the moving version of friction and bounce |
519 | // Use this when an avatar comes in contact with a prim | 523 | // Use this when an avatar comes in contact with a prim |
520 | // and is moving | 524 | AvatarMovementprimContact.surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
521 | AvatarMovementprimContact.surface.mu = mAvatarObjectContactFriction; | 525 | AvatarMovementprimContact.surface.mu = 255.0f; |
522 | AvatarMovementprimContact.surface.bounce = mAvatarObjectContactBounce; | 526 | AvatarMovementprimContact.surface.bounce = 0.01f; |
527 | AvatarMovementprimContact.surface.soft_cfm = 0.0f; // if this is 0.01 then prims become phantom to Avs! | ||
528 | AvatarMovementprimContact.surface.soft_erp = 0.001f; | ||
523 | 529 | ||
524 | // Terrain contact friction bounce and various error correcting calculations | 530 | // Terrain contact friction bounce and various error correcting calculations |
525 | // Use this when an avatar is in contact with the terrain and moving. | 531 | // Use this when an avatar is in contact with the terrain and moving. |
532 | /* | ||
526 | AvatarMovementTerrainContact.surface.mode |= d.ContactFlags.SoftERP; | 533 | AvatarMovementTerrainContact.surface.mode |= d.ContactFlags.SoftERP; |
527 | AvatarMovementTerrainContact.surface.mu = mTerrainContactFriction; | 534 | AvatarMovementTerrainContact.surface.mu = mTerrainContactFriction; |
528 | AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; | 535 | AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; |
529 | AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; | 536 | AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; |
530 | 537 | */ | |
538 | AvatarMovementTerrainContact.surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; | ||
539 | AvatarMovementTerrainContact.surface.mu = 75f; | ||
540 | AvatarMovementTerrainContact.surface.bounce = 0.0f; | ||
541 | AvatarMovementTerrainContact.surface.soft_cfm = 0.0f; | ||
542 | AvatarMovementTerrainContact.surface.soft_erp = 0.05f; | ||
531 | 543 | ||
532 | /* | 544 | /* |
533 | <summary></summary> | 545 | <summary></summary> |
@@ -549,109 +561,110 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
549 | m_materialContacts = new d.Contact[7,2]; | 561 | m_materialContacts = new d.Contact[7,2]; |
550 | 562 | ||
551 | m_materialContacts[(int)Material.Stone, 0] = new d.Contact(); | 563 | m_materialContacts[(int)Material.Stone, 0] = new d.Contact(); |
552 | m_materialContacts[(int)Material.Stone, 0].surface.mode |= d.ContactFlags.SoftERP; | 564 | m_materialContacts[(int)Material.Stone, 0].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
553 | m_materialContacts[(int)Material.Stone, 0].surface.mu = nmAvatarObjectContactFriction; | 565 | m_materialContacts[(int)Material.Stone, 0].surface.mu = 1.8f; |
554 | m_materialContacts[(int)Material.Stone, 0].surface.bounce = nmAvatarObjectContactBounce; | 566 | m_materialContacts[(int)Material.Stone, 0].surface.bounce = 0.0f; |
555 | m_materialContacts[(int)Material.Stone, 0].surface.soft_cfm = 0.010f; | 567 | m_materialContacts[(int)Material.Stone, 0].surface.soft_cfm = 0.0f; |
556 | m_materialContacts[(int)Material.Stone, 0].surface.soft_erp = 0.010f; | 568 | m_materialContacts[(int)Material.Stone, 0].surface.soft_erp = 0.50f; |
557 | 569 | ||
558 | m_materialContacts[(int)Material.Stone, 1] = new d.Contact(); | 570 | m_materialContacts[(int)Material.Stone, 1] = new d.Contact(); |
559 | m_materialContacts[(int)Material.Stone, 1].surface.mode |= d.ContactFlags.SoftERP; | 571 | m_materialContacts[(int)Material.Stone, 1].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
560 | m_materialContacts[(int)Material.Stone, 1].surface.mu = mAvatarObjectContactFriction; | 572 | m_materialContacts[(int)Material.Stone, 1].surface.mu = 1.8f; |
561 | m_materialContacts[(int)Material.Stone, 1].surface.bounce = mAvatarObjectContactBounce; | 573 | m_materialContacts[(int)Material.Stone, 1].surface.bounce = 0.0f; |
562 | m_materialContacts[(int)Material.Stone, 1].surface.soft_cfm = 0.010f; | 574 | m_materialContacts[(int)Material.Stone, 1].surface.soft_cfm = 0.0f; |
563 | m_materialContacts[(int)Material.Stone, 1].surface.soft_erp = 0.010f; | 575 | m_materialContacts[(int)Material.Stone, 1].surface.soft_erp = 0.50f; |
564 | 576 | ||
565 | m_materialContacts[(int)Material.Metal, 0] = new d.Contact(); | 577 | m_materialContacts[(int)Material.Metal, 0] = new d.Contact(); |
566 | m_materialContacts[(int)Material.Metal, 0].surface.mode |= d.ContactFlags.SoftERP; | 578 | m_materialContacts[(int)Material.Metal, 0].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
567 | m_materialContacts[(int)Material.Metal, 0].surface.mu = nmAvatarObjectContactFriction; | 579 | m_materialContacts[(int)Material.Metal, 0].surface.mu = 1.3f; |
568 | m_materialContacts[(int)Material.Metal, 0].surface.bounce = nmAvatarObjectContactBounce; | 580 | m_materialContacts[(int)Material.Metal, 0].surface.bounce = 0.2f; |
569 | m_materialContacts[(int)Material.Metal, 0].surface.soft_cfm = 0.010f; | 581 | m_materialContacts[(int)Material.Metal, 0].surface.soft_cfm = 0.0f; |
570 | m_materialContacts[(int)Material.Metal, 0].surface.soft_erp = 0.010f; | 582 | m_materialContacts[(int)Material.Metal, 0].surface.soft_erp = 0.50f; |
571 | 583 | ||
572 | m_materialContacts[(int)Material.Metal, 1] = new d.Contact(); | 584 | m_materialContacts[(int)Material.Metal, 1] = new d.Contact(); |
573 | m_materialContacts[(int)Material.Metal, 1].surface.mode |= d.ContactFlags.SoftERP; | 585 | m_materialContacts[(int)Material.Metal, 1].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
574 | m_materialContacts[(int)Material.Metal, 1].surface.mu = mAvatarObjectContactFriction; | 586 | m_materialContacts[(int)Material.Metal, 1].surface.mu = 1.3f; |
575 | m_materialContacts[(int)Material.Metal, 1].surface.bounce = mAvatarObjectContactBounce; | 587 | m_materialContacts[(int)Material.Metal, 1].surface.bounce = 0.2f; |
576 | m_materialContacts[(int)Material.Metal, 1].surface.soft_cfm = 0.010f; | 588 | m_materialContacts[(int)Material.Metal, 1].surface.soft_cfm = 0.0f; |
577 | m_materialContacts[(int)Material.Metal, 1].surface.soft_erp = 0.010f; | 589 | m_materialContacts[(int)Material.Metal, 1].surface.soft_erp = 0.50f; |
578 | |||
579 | m_materialContacts[(int)Material.Glass, 0] = new d.Contact(); | ||
580 | m_materialContacts[(int)Material.Glass, 0].surface.mode |= d.ContactFlags.SoftERP; | ||
581 | m_materialContacts[(int)Material.Glass, 0].surface.mu = 1f; | ||
582 | m_materialContacts[(int)Material.Glass, 0].surface.bounce = 0.5f; | ||
583 | m_materialContacts[(int)Material.Glass, 0].surface.soft_cfm = 0.010f; | ||
584 | m_materialContacts[(int)Material.Glass, 0].surface.soft_erp = 0.010f; | ||
585 | 590 | ||
586 | /* | 591 | /* |
587 | private float nmAvatarObjectContactFriction = 250f; | 592 | flags : d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce |
593 | private float nmAvatarObjectContactFriction = 250f; | ||
588 | private float nmAvatarObjectContactBounce = 0.1f; | 594 | private float nmAvatarObjectContactBounce = 0.1f; |
589 | 595 | ||
590 | private float mAvatarObjectContactFriction = 75f; | 596 | private float mAvatarObjectContactFriction = 75f; |
591 | private float mAvatarObjectContactBounce = 0.1f; | 597 | private float mAvatarObjectContactBounce = 0.1f; |
592 | */ | 598 | */ |
599 | m_materialContacts[(int)Material.Glass, 0] = new d.Contact(); | ||
600 | m_materialContacts[(int)Material.Glass, 0].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; | ||
601 | m_materialContacts[(int)Material.Glass, 0].surface.mu = 1f; | ||
602 | m_materialContacts[(int)Material.Glass, 0].surface.bounce = 0.1f; | ||
603 | m_materialContacts[(int)Material.Glass, 0].surface.soft_cfm = 0.0f; | ||
604 | m_materialContacts[(int)Material.Glass, 0].surface.soft_erp = 0.50f; | ||
605 | |||
593 | m_materialContacts[(int)Material.Glass, 1] = new d.Contact(); | 606 | m_materialContacts[(int)Material.Glass, 1] = new d.Contact(); |
594 | m_materialContacts[(int)Material.Glass, 1].surface.mode |= d.ContactFlags.SoftERP; | 607 | m_materialContacts[(int)Material.Glass, 1].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
595 | m_materialContacts[(int)Material.Glass, 1].surface.mu = 1f; | 608 | m_materialContacts[(int)Material.Glass, 1].surface.mu = 1f; |
596 | m_materialContacts[(int)Material.Glass, 1].surface.bounce = 0.5f; | 609 | m_materialContacts[(int)Material.Glass, 1].surface.bounce = 0.1f; |
597 | m_materialContacts[(int)Material.Glass, 1].surface.soft_cfm = 0.010f; | 610 | m_materialContacts[(int)Material.Glass, 1].surface.soft_cfm = 0.0f; |
598 | m_materialContacts[(int)Material.Glass, 1].surface.soft_erp = 0.010f; | 611 | m_materialContacts[(int)Material.Glass, 1].surface.soft_erp = 0.50f; |
599 | 612 | ||
600 | m_materialContacts[(int)Material.Wood, 0] = new d.Contact(); | 613 | m_materialContacts[(int)Material.Wood, 0] = new d.Contact(); |
601 | m_materialContacts[(int)Material.Wood, 0].surface.mode |= d.ContactFlags.SoftERP; | 614 | m_materialContacts[(int)Material.Wood, 0].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
602 | m_materialContacts[(int)Material.Wood, 0].surface.mu = nmAvatarObjectContactFriction; | 615 | m_materialContacts[(int)Material.Wood, 0].surface.mu = 1.6f; |
603 | m_materialContacts[(int)Material.Wood, 0].surface.bounce = nmAvatarObjectContactBounce; | 616 | m_materialContacts[(int)Material.Wood, 0].surface.bounce = 0.1f; |
604 | m_materialContacts[(int)Material.Wood, 0].surface.soft_cfm = 0.010f; | 617 | m_materialContacts[(int)Material.Wood, 0].surface.soft_cfm = 0.0f; |
605 | m_materialContacts[(int)Material.Wood, 0].surface.soft_erp = 0.010f; | 618 | m_materialContacts[(int)Material.Wood, 0].surface.soft_erp = 0.50f; |
606 | 619 | ||
607 | m_materialContacts[(int)Material.Wood, 1] = new d.Contact(); | 620 | m_materialContacts[(int)Material.Wood, 1] = new d.Contact(); |
608 | m_materialContacts[(int)Material.Wood, 1].surface.mode |= d.ContactFlags.SoftERP; | 621 | m_materialContacts[(int)Material.Wood, 1].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
609 | m_materialContacts[(int)Material.Wood, 1].surface.mu = mAvatarObjectContactFriction; | 622 | m_materialContacts[(int)Material.Wood, 1].surface.mu = 1.6f; |
610 | m_materialContacts[(int)Material.Wood, 1].surface.bounce = mAvatarObjectContactBounce; | 623 | m_materialContacts[(int)Material.Wood, 1].surface.bounce = 0.1f; |
611 | m_materialContacts[(int)Material.Wood, 1].surface.soft_cfm = 0.010f; | 624 | m_materialContacts[(int)Material.Wood, 1].surface.soft_cfm = 0.0f; |
612 | m_materialContacts[(int)Material.Wood, 1].surface.soft_erp = 0.010f; | 625 | m_materialContacts[(int)Material.Wood, 1].surface.soft_erp = 0.50f; |
613 | 626 | ||
614 | m_materialContacts[(int)Material.Flesh, 0] = new d.Contact(); | 627 | m_materialContacts[(int)Material.Flesh, 0] = new d.Contact(); |
615 | m_materialContacts[(int)Material.Flesh, 0].surface.mode |= d.ContactFlags.SoftERP; | 628 | m_materialContacts[(int)Material.Flesh, 0].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
616 | m_materialContacts[(int)Material.Flesh, 0].surface.mu = nmAvatarObjectContactFriction; | 629 | m_materialContacts[(int)Material.Flesh, 0].surface.mu = 2.0f; |
617 | m_materialContacts[(int)Material.Flesh, 0].surface.bounce = nmAvatarObjectContactBounce; | 630 | m_materialContacts[(int)Material.Flesh, 0].surface.bounce = 0.0f; |
618 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_cfm = 0.010f; | 631 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_cfm = 0.0f; |
619 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_erp = 0.010f; | 632 | m_materialContacts[(int)Material.Flesh, 0].surface.soft_erp = 0.50f; |
620 | 633 | ||
621 | m_materialContacts[(int)Material.Flesh, 1] = new d.Contact(); | 634 | m_materialContacts[(int)Material.Flesh, 1] = new d.Contact(); |
622 | m_materialContacts[(int)Material.Flesh, 1].surface.mode |= d.ContactFlags.SoftERP; | 635 | m_materialContacts[(int)Material.Flesh, 1].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
623 | m_materialContacts[(int)Material.Flesh, 1].surface.mu = mAvatarObjectContactFriction; | 636 | m_materialContacts[(int)Material.Flesh, 1].surface.mu = 2.0f; |
624 | m_materialContacts[(int)Material.Flesh, 1].surface.bounce = mAvatarObjectContactBounce; | 637 | m_materialContacts[(int)Material.Flesh, 1].surface.bounce = 0.0f; |
625 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_cfm = 0.010f; | 638 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_cfm = 0.0f; |
626 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_erp = 0.010f; | 639 | m_materialContacts[(int)Material.Flesh, 1].surface.soft_erp = 0.50f; |
627 | 640 | ||
628 | m_materialContacts[(int)Material.Plastic, 0] = new d.Contact(); | 641 | m_materialContacts[(int)Material.Plastic, 0] = new d.Contact(); |
629 | m_materialContacts[(int)Material.Plastic, 0].surface.mode |= d.ContactFlags.SoftERP; | 642 | m_materialContacts[(int)Material.Plastic, 0].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
630 | m_materialContacts[(int)Material.Plastic, 0].surface.mu = nmAvatarObjectContactFriction; | 643 | m_materialContacts[(int)Material.Plastic, 0].surface.mu = 1.5f; |
631 | m_materialContacts[(int)Material.Plastic, 0].surface.bounce = nmAvatarObjectContactBounce; | 644 | m_materialContacts[(int)Material.Plastic, 0].surface.bounce = 0.2f; |
632 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_cfm = 0.010f; | 645 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_cfm = 0.0f; |
633 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_erp = 0.010f; | 646 | m_materialContacts[(int)Material.Plastic, 0].surface.soft_erp = 0.50f; |
634 | 647 | ||
635 | m_materialContacts[(int)Material.Plastic, 1] = new d.Contact(); | 648 | m_materialContacts[(int)Material.Plastic, 1] = new d.Contact(); |
636 | m_materialContacts[(int)Material.Plastic, 1].surface.mode |= d.ContactFlags.SoftERP; | 649 | m_materialContacts[(int)Material.Plastic, 1].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
637 | m_materialContacts[(int)Material.Plastic, 1].surface.mu = mAvatarObjectContactFriction; | 650 | m_materialContacts[(int)Material.Plastic, 1].surface.mu = 1.5f; |
638 | m_materialContacts[(int)Material.Plastic, 1].surface.bounce = mAvatarObjectContactBounce; | 651 | m_materialContacts[(int)Material.Plastic, 1].surface.bounce = 0.2f; |
639 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_cfm = 0.010f; | 652 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_cfm = 0.0f; |
640 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_erp = 0.010f; | 653 | m_materialContacts[(int)Material.Plastic, 1].surface.soft_erp = 0.50f; |
641 | 654 | ||
642 | m_materialContacts[(int)Material.Rubber, 0] = new d.Contact(); | 655 | m_materialContacts[(int)Material.Rubber, 0] = new d.Contact(); |
643 | m_materialContacts[(int)Material.Rubber, 0].surface.mode |= d.ContactFlags.SoftERP; | 656 | m_materialContacts[(int)Material.Rubber, 0].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
644 | m_materialContacts[(int)Material.Rubber, 0].surface.mu = nmAvatarObjectContactFriction; | 657 | m_materialContacts[(int)Material.Rubber, 0].surface.mu = 2.0f; |
645 | m_materialContacts[(int)Material.Rubber, 0].surface.bounce = nmAvatarObjectContactBounce; | 658 | m_materialContacts[(int)Material.Rubber, 0].surface.bounce = 0.7f; |
646 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_cfm = 0.010f; | 659 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_cfm = 0.0f; |
647 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_erp = 0.010f; | 660 | m_materialContacts[(int)Material.Rubber, 0].surface.soft_erp = 0.50f; |
648 | 661 | ||
649 | m_materialContacts[(int)Material.Rubber, 1] = new d.Contact(); | 662 | m_materialContacts[(int)Material.Rubber, 1] = new d.Contact(); |
650 | m_materialContacts[(int)Material.Rubber, 1].surface.mode |= d.ContactFlags.SoftERP; | 663 | m_materialContacts[(int)Material.Rubber, 1].surface.mode = d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP | d.ContactFlags.Bounce; |
651 | m_materialContacts[(int)Material.Rubber, 1].surface.mu = mAvatarObjectContactFriction; | 664 | m_materialContacts[(int)Material.Rubber, 1].surface.mu = 2.0f; |
652 | m_materialContacts[(int)Material.Rubber, 1].surface.bounce = mAvatarObjectContactBounce; | 665 | m_materialContacts[(int)Material.Rubber, 1].surface.bounce = 0.7f; |
653 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_cfm = 0.010f; | 666 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_cfm = 0.0f; |
654 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_erp = 0.010f; | 667 | m_materialContacts[(int)Material.Rubber, 1].surface.soft_erp = 0.50f; |
655 | 668 | ||
656 | d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh); | 669 | d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh); |
657 | 670 | ||
@@ -660,10 +673,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
660 | d.WorldSetGravity(world, gravityx, gravityy, gravityz); | 673 | d.WorldSetGravity(world, gravityx, gravityy, gravityz); |
661 | d.WorldSetContactSurfaceLayer(world, contactsurfacelayer); | 674 | d.WorldSetContactSurfaceLayer(world, contactsurfacelayer); |
662 | 675 | ||
676 | |||
677 | d.WorldSetLinearDampingThreshold(world, 256f); | ||
663 | d.WorldSetLinearDamping(world, 256f); | 678 | d.WorldSetLinearDamping(world, 256f); |
664 | d.WorldSetAngularDamping(world, 256f); | 679 | // d.WorldSetLinearDampingThreshold(world, 0.01f); |
680 | // d.WorldSetLinearDamping(world, 0.1f); | ||
665 | d.WorldSetAngularDampingThreshold(world, 256f); | 681 | d.WorldSetAngularDampingThreshold(world, 256f); |
666 | d.WorldSetLinearDampingThreshold(world, 256f); | 682 | d.WorldSetAngularDamping(world, 256f); |
667 | d.WorldSetMaxAngularSpeed(world, 256f); | 683 | d.WorldSetMaxAngularSpeed(world, 256f); |
668 | 684 | ||
669 | // Set how many steps we go without running collision testing | 685 | // Set how many steps we go without running collision testing |
@@ -1184,7 +1200,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1184 | { | 1200 | { |
1185 | if ((Math.Abs(p2.Velocity.X) > 0.01f || Math.Abs(p2.Velocity.Y) > 0.01f)) | 1201 | if ((Math.Abs(p2.Velocity.X) > 0.01f || Math.Abs(p2.Velocity.Y) > 0.01f)) |
1186 | { | 1202 | { |
1187 | // Use the Movement prim contact | 1203 | // Use the AV Movement / prim contact |
1188 | AvatarMovementprimContact.geom = curContact; | 1204 | AvatarMovementprimContact.geom = curContact; |
1189 | _perloopContact.Add(curContact); | 1205 | _perloopContact.Add(curContact); |
1190 | if (m_global_contactcount < maxContactsbeforedeath) | 1206 | if (m_global_contactcount < maxContactsbeforedeath) |
@@ -1195,7 +1211,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1195 | } | 1211 | } |
1196 | else | 1212 | else |
1197 | { | 1213 | { |
1198 | // Use the non movement contact | 1214 | // Use the Av non movement / prim contact |
1199 | contact.geom = curContact; | 1215 | contact.geom = curContact; |
1200 | _perloopContact.Add(curContact); | 1216 | _perloopContact.Add(curContact); |
1201 | 1217 | ||