physics.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. datablock PhysicsShapeData( PhysicsCube )
  23. {
  24. category = "Physics";
  25. shapeName = "art/shapes/cube/cube.dae";
  26. emap = true;
  27. //physics properties
  28. mass = "0.5";
  29. friction = "0.4";
  30. staticFriction = "0.5";
  31. restitution = "0.3";
  32. linearDamping = "0.1";
  33. angularDamping = "0.2";
  34. linearSleepThreshold = "1.0";
  35. angularSleepThreshold = "1.0";
  36. buoyancyDensity = "0.9";
  37. waterDampingScale = "10";
  38. //damage - dynamic fields
  39. radiusDamage = 0;
  40. damageRadius = 0;
  41. areaImpulse = 0;
  42. invulnerable = true;
  43. };
  44. datablock PhysicsShapeData( PhysicsBoulder )
  45. {
  46. category = "Physics";
  47. shapeName = "art/shapes/rocks/boulder.dts";
  48. emap = true;
  49. //physics properties
  50. mass = "20";
  51. friction = "0.2";
  52. staticFriction = "0.3";
  53. restitution = "0.8";
  54. linearDamping = "0.1";
  55. angularDamping = "0.2";
  56. linearSleepThreshold = "1.0";
  57. angularSleepThreshold = "1.0";
  58. buoyancyDensity = "0.9";
  59. waterDampingScale = "10";
  60. //damage - dynamic fields
  61. radiusDamage = 0;
  62. damageRadius = 0;
  63. areaImpulse = 0;
  64. invulnerable = false;
  65. };