class_physicsserver.rst 188 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/PhysicsServer.xml.
  6. .. _class_PhysicsServer:
  7. PhysicsServer
  8. =============
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Server interface for low-level physics access.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`area_add_shape<class_PhysicsServer_method_area_add_shape>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform<class_Transform>` transform=Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), :ref:`bool<class_bool>` disabled=false **)** |
  22. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`area_attach_object_instance_id<class_PhysicsServer_method_area_attach_object_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |
  24. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`area_clear_shapes<class_PhysicsServer_method_area_clear_shapes>` **(** :ref:`RID<class_RID>` area **)** |
  26. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`RID<class_RID>` | :ref:`area_create<class_PhysicsServer_method_area_create>` **(** **)** |
  28. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`area_get_object_instance_id<class_PhysicsServer_method_area_get_object_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| |
  30. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`Variant<class_Variant>` | :ref:`area_get_param<class_PhysicsServer_method_area_get_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` param **)** |const| |
  32. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`RID<class_RID>` | :ref:`area_get_shape<class_PhysicsServer_method_area_get_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| |
  34. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`int<class_int>` | :ref:`area_get_shape_count<class_PhysicsServer_method_area_get_shape_count>` **(** :ref:`RID<class_RID>` area **)** |const| |
  36. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`Transform<class_Transform>` | :ref:`area_get_shape_transform<class_PhysicsServer_method_area_get_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| |
  38. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`RID<class_RID>` | :ref:`area_get_space<class_PhysicsServer_method_area_get_space>` **(** :ref:`RID<class_RID>` area **)** |const| |
  40. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` | :ref:`area_get_space_override_mode<class_PhysicsServer_method_area_get_space_override_mode>` **(** :ref:`RID<class_RID>` area **)** |const| |
  42. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Transform<class_Transform>` | :ref:`area_get_transform<class_PhysicsServer_method_area_get_transform>` **(** :ref:`RID<class_RID>` area **)** |const| |
  44. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`area_is_ray_pickable<class_PhysicsServer_method_area_is_ray_pickable>` **(** :ref:`RID<class_RID>` area **)** |const| |
  46. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`area_remove_shape<class_PhysicsServer_method_area_remove_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |
  48. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`area_set_area_monitor_callback<class_PhysicsServer_method_area_set_area_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` method **)** |
  50. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`area_set_collision_layer<class_PhysicsServer_method_area_set_collision_layer>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** |
  52. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`area_set_collision_mask<class_PhysicsServer_method_area_set_collision_mask>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** |
  54. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`area_set_monitor_callback<class_PhysicsServer_method_area_set_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` method **)** |
  56. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | void | :ref:`area_set_monitorable<class_PhysicsServer_method_area_set_monitorable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** |
  58. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`area_set_param<class_PhysicsServer_method_area_set_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** |
  60. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`area_set_ray_pickable<class_PhysicsServer_method_area_set_ray_pickable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` enable **)** |
  62. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`area_set_shape<class_PhysicsServer_method_area_set_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |
  64. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`area_set_shape_disabled<class_PhysicsServer_method_area_set_shape_disabled>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |
  66. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`area_set_shape_transform<class_PhysicsServer_method_area_set_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform<class_Transform>` transform **)** |
  68. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`area_set_space<class_PhysicsServer_method_area_set_space>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** |
  70. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`area_set_space_override_mode<class_PhysicsServer_method_area_set_space_override_mode>` **(** :ref:`RID<class_RID>` area, :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` mode **)** |
  72. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`area_set_transform<class_PhysicsServer_method_area_set_transform>` **(** :ref:`RID<class_RID>` area, :ref:`Transform<class_Transform>` transform **)** |
  74. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`body_add_central_force<class_PhysicsServer_method_body_add_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** |
  76. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | void | :ref:`body_add_collision_exception<class_PhysicsServer_method_body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |
  78. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`body_add_force<class_PhysicsServer_method_body_add_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |
  80. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`body_add_shape<class_PhysicsServer_method_body_add_shape>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform<class_Transform>` transform=Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), :ref:`bool<class_bool>` disabled=false **)** |
  82. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`body_add_torque<class_PhysicsServer_method_body_add_torque>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** |
  84. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`body_apply_central_impulse<class_PhysicsServer_method_body_apply_central_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** |
  86. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`body_apply_impulse<class_PhysicsServer_method_body_apply_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` impulse **)** |
  88. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`body_apply_torque_impulse<class_PhysicsServer_method_body_apply_torque_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** |
  90. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`body_attach_object_instance_id<class_PhysicsServer_method_body_attach_object_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |
  92. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`body_clear_shapes<class_PhysicsServer_method_body_clear_shapes>` **(** :ref:`RID<class_RID>` body **)** |
  94. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`RID<class_RID>` | :ref:`body_create<class_PhysicsServer_method_body_create>` **(** :ref:`BodyMode<enum_PhysicsServer_BodyMode>` mode=2, :ref:`bool<class_bool>` init_sleeping=false **)** |
  96. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`int<class_int>` | :ref:`body_get_collision_layer<class_PhysicsServer_method_body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |const| |
  98. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`int<class_int>` | :ref:`body_get_collision_mask<class_PhysicsServer_method_body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |const| |
  100. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`PhysicsDirectBodyState<class_PhysicsDirectBodyState>` | :ref:`body_get_direct_state<class_PhysicsServer_method_body_get_direct_state>` **(** :ref:`RID<class_RID>` body **)** |
  102. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`float<class_float>` | :ref:`body_get_kinematic_safe_margin<class_PhysicsServer_method_body_get_kinematic_safe_margin>` **(** :ref:`RID<class_RID>` body **)** |const| |
  104. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`int<class_int>` | :ref:`body_get_max_contacts_reported<class_PhysicsServer_method_body_get_max_contacts_reported>` **(** :ref:`RID<class_RID>` body **)** |const| |
  106. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`BodyMode<enum_PhysicsServer_BodyMode>` | :ref:`body_get_mode<class_PhysicsServer_method_body_get_mode>` **(** :ref:`RID<class_RID>` body **)** |const| |
  108. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`int<class_int>` | :ref:`body_get_object_instance_id<class_PhysicsServer_method_body_get_object_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| |
  110. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`float<class_float>` | :ref:`body_get_param<class_PhysicsServer_method_body_get_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` param **)** |const| |
  112. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`RID<class_RID>` | :ref:`body_get_shape<class_PhysicsServer_method_body_get_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| |
  114. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`int<class_int>` | :ref:`body_get_shape_count<class_PhysicsServer_method_body_get_shape_count>` **(** :ref:`RID<class_RID>` body **)** |const| |
  116. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`Transform<class_Transform>` | :ref:`body_get_shape_transform<class_PhysicsServer_method_body_get_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| |
  118. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`RID<class_RID>` | :ref:`body_get_space<class_PhysicsServer_method_body_get_space>` **(** :ref:`RID<class_RID>` body **)** |const| |
  120. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :ref:`Variant<class_Variant>` | :ref:`body_get_state<class_PhysicsServer_method_body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer_BodyState>` state **)** |const| |
  122. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`bool<class_bool>` | :ref:`body_is_axis_locked<class_PhysicsServer_method_body_is_axis_locked>` **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` axis **)** |const| |
  124. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`bool<class_bool>` | :ref:`body_is_continuous_collision_detection_enabled<class_PhysicsServer_method_body_is_continuous_collision_detection_enabled>` **(** :ref:`RID<class_RID>` body **)** |const| |
  126. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`bool<class_bool>` | :ref:`body_is_omitting_force_integration<class_PhysicsServer_method_body_is_omitting_force_integration>` **(** :ref:`RID<class_RID>` body **)** |const| |
  128. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :ref:`bool<class_bool>` | :ref:`body_is_ray_pickable<class_PhysicsServer_method_body_is_ray_pickable>` **(** :ref:`RID<class_RID>` body **)** |const| |
  130. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | void | :ref:`body_remove_collision_exception<class_PhysicsServer_method_body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |
  132. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | void | :ref:`body_remove_shape<class_PhysicsServer_method_body_remove_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |
  134. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | void | :ref:`body_set_axis_lock<class_PhysicsServer_method_body_set_axis_lock>` **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** |
  136. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | void | :ref:`body_set_axis_velocity<class_PhysicsServer_method_body_set_axis_velocity>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` axis_velocity **)** |
  138. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | void | :ref:`body_set_collision_layer<class_PhysicsServer_method_body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |
  140. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | void | :ref:`body_set_collision_mask<class_PhysicsServer_method_body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |
  142. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | void | :ref:`body_set_enable_continuous_collision_detection<class_PhysicsServer_method_body_set_enable_continuous_collision_detection>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |
  144. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | void | :ref:`body_set_force_integration_callback<class_PhysicsServer_method_body_set_force_integration_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` method, :ref:`Variant<class_Variant>` userdata=null **)** |
  146. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | void | :ref:`body_set_kinematic_safe_margin<class_PhysicsServer_method_body_set_kinematic_safe_margin>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` margin **)** |
  148. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | void | :ref:`body_set_max_contacts_reported<class_PhysicsServer_method_body_set_max_contacts_reported>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** |
  150. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | void | :ref:`body_set_mode<class_PhysicsServer_method_body_set_mode>` **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer_BodyMode>` mode **)** |
  152. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | void | :ref:`body_set_omit_force_integration<class_PhysicsServer_method_body_set_omit_force_integration>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |
  154. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | void | :ref:`body_set_param<class_PhysicsServer_method_body_set_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` param, :ref:`float<class_float>` value **)** |
  156. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | void | :ref:`body_set_ray_pickable<class_PhysicsServer_method_body_set_ray_pickable>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |
  158. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | void | :ref:`body_set_shape<class_PhysicsServer_method_body_set_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |
  160. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | void | :ref:`body_set_shape_disabled<class_PhysicsServer_method_body_set_shape_disabled>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |
  162. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | void | :ref:`body_set_shape_transform<class_PhysicsServer_method_body_set_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform<class_Transform>` transform **)** |
  164. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | void | :ref:`body_set_space<class_PhysicsServer_method_body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |
  166. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | void | :ref:`body_set_state<class_PhysicsServer_method_body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer_BodyState>` state, :ref:`Variant<class_Variant>` value **)** |
  168. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | :ref:`bool<class_bool>` | :ref:`body_test_motion<class_PhysicsServer_method_body_test_motion>` **(** :ref:`RID<class_RID>` body, :ref:`Transform<class_Transform>` from, :ref:`Vector3<class_Vector3>` motion, :ref:`bool<class_bool>` infinite_inertia, :ref:`PhysicsTestMotionResult<class_PhysicsTestMotionResult>` result=null, :ref:`bool<class_bool>` exclude_raycast_shapes=true, :ref:`Array<class_Array>` exclude=[ ] **)** |
  170. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | :ref:`float<class_float>` | :ref:`cone_twist_joint_get_param<class_PhysicsServer_method_cone_twist_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` param **)** |const| |
  172. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | void | :ref:`cone_twist_joint_set_param<class_PhysicsServer_method_cone_twist_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` param, :ref:`float<class_float>` value **)** |
  174. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | void | :ref:`free_rid<class_PhysicsServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  176. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | :ref:`bool<class_bool>` | :ref:`generic_6dof_joint_get_flag<class_PhysicsServer_method_generic_6dof_joint_get_flag>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` flag **)** |
  178. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | :ref:`float<class_float>` | :ref:`generic_6dof_joint_get_param<class_PhysicsServer_method_generic_6dof_joint_get_param>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` param **)** |
  180. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | void | :ref:`generic_6dof_joint_set_flag<class_PhysicsServer_method_generic_6dof_joint_set_flag>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` flag, :ref:`bool<class_bool>` enable **)** |
  182. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | void | :ref:`generic_6dof_joint_set_param<class_PhysicsServer_method_generic_6dof_joint_set_param>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` param, :ref:`float<class_float>` value **)** |
  184. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | :ref:`int<class_int>` | :ref:`get_process_info<class_PhysicsServer_method_get_process_info>` **(** :ref:`ProcessInfo<enum_PhysicsServer_ProcessInfo>` process_info **)** |
  186. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | :ref:`bool<class_bool>` | :ref:`hinge_joint_get_flag<class_PhysicsServer_method_hinge_joint_get_flag>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` flag **)** |const| |
  188. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | :ref:`float<class_float>` | :ref:`hinge_joint_get_param<class_PhysicsServer_method_hinge_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` param **)** |const| |
  190. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | void | :ref:`hinge_joint_set_flag<class_PhysicsServer_method_hinge_joint_set_flag>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` flag, :ref:`bool<class_bool>` enabled **)** |
  192. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | void | :ref:`hinge_joint_set_param<class_PhysicsServer_method_hinge_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` param, :ref:`float<class_float>` value **)** |
  194. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | :ref:`RID<class_RID>` | :ref:`joint_create_cone_twist<class_PhysicsServer_method_joint_create_cone_twist>` **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` local_ref_B **)** |
  196. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | :ref:`RID<class_RID>` | :ref:`joint_create_generic_6dof<class_PhysicsServer_method_joint_create_generic_6dof>` **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` local_ref_B **)** |
  198. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | :ref:`RID<class_RID>` | :ref:`joint_create_hinge<class_PhysicsServer_method_joint_create_hinge>` **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` hinge_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` hinge_B **)** |
  200. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | :ref:`RID<class_RID>` | :ref:`joint_create_pin<class_PhysicsServer_method_joint_create_pin>` **(** :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` local_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` local_B **)** |
  202. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | :ref:`RID<class_RID>` | :ref:`joint_create_slider<class_PhysicsServer_method_joint_create_slider>` **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` local_ref_B **)** |
  204. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | :ref:`int<class_int>` | :ref:`joint_get_solver_priority<class_PhysicsServer_method_joint_get_solver_priority>` **(** :ref:`RID<class_RID>` joint **)** |const| |
  206. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | :ref:`JointType<enum_PhysicsServer_JointType>` | :ref:`joint_get_type<class_PhysicsServer_method_joint_get_type>` **(** :ref:`RID<class_RID>` joint **)** |const| |
  208. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | void | :ref:`joint_set_solver_priority<class_PhysicsServer_method_joint_set_solver_priority>` **(** :ref:`RID<class_RID>` joint, :ref:`int<class_int>` priority **)** |
  210. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | :ref:`Vector3<class_Vector3>` | :ref:`pin_joint_get_local_a<class_PhysicsServer_method_pin_joint_get_local_a>` **(** :ref:`RID<class_RID>` joint **)** |const| |
  212. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | :ref:`Vector3<class_Vector3>` | :ref:`pin_joint_get_local_b<class_PhysicsServer_method_pin_joint_get_local_b>` **(** :ref:`RID<class_RID>` joint **)** |const| |
  214. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | :ref:`float<class_float>` | :ref:`pin_joint_get_param<class_PhysicsServer_method_pin_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` param **)** |const| |
  216. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | void | :ref:`pin_joint_set_local_a<class_PhysicsServer_method_pin_joint_set_local_a>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_A **)** |
  218. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | void | :ref:`pin_joint_set_local_b<class_PhysicsServer_method_pin_joint_set_local_b>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_B **)** |
  220. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | void | :ref:`pin_joint_set_param<class_PhysicsServer_method_pin_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` param, :ref:`float<class_float>` value **)** |
  222. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | void | :ref:`set_active<class_PhysicsServer_method_set_active>` **(** :ref:`bool<class_bool>` active **)** |
  224. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | void | :ref:`set_collision_iterations<class_PhysicsServer_method_set_collision_iterations>` **(** :ref:`int<class_int>` iterations **)** |
  226. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | :ref:`RID<class_RID>` | :ref:`shape_create<class_PhysicsServer_method_shape_create>` **(** :ref:`ShapeType<enum_PhysicsServer_ShapeType>` type **)** |
  228. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | :ref:`Variant<class_Variant>` | :ref:`shape_get_data<class_PhysicsServer_method_shape_get_data>` **(** :ref:`RID<class_RID>` shape **)** |const| |
  230. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. | :ref:`ShapeType<enum_PhysicsServer_ShapeType>` | :ref:`shape_get_type<class_PhysicsServer_method_shape_get_type>` **(** :ref:`RID<class_RID>` shape **)** |const| |
  232. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | void | :ref:`shape_set_data<class_PhysicsServer_method_shape_set_data>` **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** |
  234. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | :ref:`float<class_float>` | :ref:`slider_joint_get_param<class_PhysicsServer_method_slider_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` param **)** |const| |
  236. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | void | :ref:`slider_joint_set_param<class_PhysicsServer_method_slider_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` param, :ref:`float<class_float>` value **)** |
  238. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | :ref:`RID<class_RID>` | :ref:`space_create<class_PhysicsServer_method_space_create>` **(** **)** |
  240. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | :ref:`PhysicsDirectSpaceState<class_PhysicsDirectSpaceState>` | :ref:`space_get_direct_state<class_PhysicsServer_method_space_get_direct_state>` **(** :ref:`RID<class_RID>` space **)** |
  242. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | :ref:`float<class_float>` | :ref:`space_get_param<class_PhysicsServer_method_space_get_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` param **)** |const| |
  244. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. | :ref:`bool<class_bool>` | :ref:`space_is_active<class_PhysicsServer_method_space_is_active>` **(** :ref:`RID<class_RID>` space **)** |const| |
  246. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  247. | void | :ref:`space_set_active<class_PhysicsServer_method_space_set_active>` **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** |
  248. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  249. | void | :ref:`space_set_param<class_PhysicsServer_method_space_set_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` param, :ref:`float<class_float>` value **)** |
  250. +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  251. .. rst-class:: classref-section-separator
  252. ----
  253. .. rst-class:: classref-descriptions-group
  254. Enumerations
  255. ------------
  256. .. _enum_PhysicsServer_JointType:
  257. .. rst-class:: classref-enumeration
  258. enum **JointType**:
  259. .. _class_PhysicsServer_constant_JOINT_PIN:
  260. .. rst-class:: classref-enumeration-constant
  261. :ref:`JointType<enum_PhysicsServer_JointType>` **JOINT_PIN** = ``0``
  262. The :ref:`Joint<class_Joint>` is a :ref:`PinJoint<class_PinJoint>`.
  263. .. _class_PhysicsServer_constant_JOINT_HINGE:
  264. .. rst-class:: classref-enumeration-constant
  265. :ref:`JointType<enum_PhysicsServer_JointType>` **JOINT_HINGE** = ``1``
  266. The :ref:`Joint<class_Joint>` is a :ref:`HingeJoint<class_HingeJoint>`.
  267. .. _class_PhysicsServer_constant_JOINT_SLIDER:
  268. .. rst-class:: classref-enumeration-constant
  269. :ref:`JointType<enum_PhysicsServer_JointType>` **JOINT_SLIDER** = ``2``
  270. The :ref:`Joint<class_Joint>` is a :ref:`SliderJoint<class_SliderJoint>`.
  271. .. _class_PhysicsServer_constant_JOINT_CONE_TWIST:
  272. .. rst-class:: classref-enumeration-constant
  273. :ref:`JointType<enum_PhysicsServer_JointType>` **JOINT_CONE_TWIST** = ``3``
  274. The :ref:`Joint<class_Joint>` is a :ref:`ConeTwistJoint<class_ConeTwistJoint>`.
  275. .. _class_PhysicsServer_constant_JOINT_6DOF:
  276. .. rst-class:: classref-enumeration-constant
  277. :ref:`JointType<enum_PhysicsServer_JointType>` **JOINT_6DOF** = ``4``
  278. The :ref:`Joint<class_Joint>` is a :ref:`Generic6DOFJoint<class_Generic6DOFJoint>`.
  279. .. rst-class:: classref-item-separator
  280. ----
  281. .. _enum_PhysicsServer_PinJointParam:
  282. .. rst-class:: classref-enumeration
  283. enum **PinJointParam**:
  284. .. _class_PhysicsServer_constant_PIN_JOINT_BIAS:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` **PIN_JOINT_BIAS** = ``0``
  287. The strength with which the pinned objects try to stay in positional relation to each other.
  288. The higher, the stronger.
  289. .. _class_PhysicsServer_constant_PIN_JOINT_DAMPING:
  290. .. rst-class:: classref-enumeration-constant
  291. :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` **PIN_JOINT_DAMPING** = ``1``
  292. The strength with which the pinned objects try to stay in velocity relation to each other.
  293. The higher, the stronger.
  294. .. _class_PhysicsServer_constant_PIN_JOINT_IMPULSE_CLAMP:
  295. .. rst-class:: classref-enumeration-constant
  296. :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` **PIN_JOINT_IMPULSE_CLAMP** = ``2``
  297. If above 0, this value is the maximum value for an impulse that this Joint puts on its ends.
  298. .. rst-class:: classref-item-separator
  299. ----
  300. .. _enum_PhysicsServer_HingeJointParam:
  301. .. rst-class:: classref-enumeration
  302. enum **HingeJointParam**:
  303. .. _class_PhysicsServer_constant_HINGE_JOINT_BIAS:
  304. .. rst-class:: classref-enumeration-constant
  305. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_BIAS** = ``0``
  306. The speed with which the two bodies get pulled together when they move in different directions.
  307. .. _class_PhysicsServer_constant_HINGE_JOINT_LIMIT_UPPER:
  308. .. rst-class:: classref-enumeration-constant
  309. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_LIMIT_UPPER** = ``1``
  310. The maximum rotation across the Hinge.
  311. .. _class_PhysicsServer_constant_HINGE_JOINT_LIMIT_LOWER:
  312. .. rst-class:: classref-enumeration-constant
  313. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_LIMIT_LOWER** = ``2``
  314. The minimum rotation across the Hinge.
  315. .. _class_PhysicsServer_constant_HINGE_JOINT_LIMIT_BIAS:
  316. .. rst-class:: classref-enumeration-constant
  317. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_LIMIT_BIAS** = ``3``
  318. The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  319. .. _class_PhysicsServer_constant_HINGE_JOINT_LIMIT_SOFTNESS:
  320. .. rst-class:: classref-enumeration-constant
  321. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_LIMIT_SOFTNESS** = ``4``
  322. .. _class_PhysicsServer_constant_HINGE_JOINT_LIMIT_RELAXATION:
  323. .. rst-class:: classref-enumeration-constant
  324. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_LIMIT_RELAXATION** = ``5``
  325. The lower this value, the more the rotation gets slowed down.
  326. .. _class_PhysicsServer_constant_HINGE_JOINT_MOTOR_TARGET_VELOCITY:
  327. .. rst-class:: classref-enumeration-constant
  328. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_MOTOR_TARGET_VELOCITY** = ``6``
  329. Target speed for the motor.
  330. .. _class_PhysicsServer_constant_HINGE_JOINT_MOTOR_MAX_IMPULSE:
  331. .. rst-class:: classref-enumeration-constant
  332. :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` **HINGE_JOINT_MOTOR_MAX_IMPULSE** = ``7``
  333. Maximum acceleration for the motor.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _enum_PhysicsServer_HingeJointFlag:
  337. .. rst-class:: classref-enumeration
  338. enum **HingeJointFlag**:
  339. .. _class_PhysicsServer_constant_HINGE_JOINT_FLAG_USE_LIMIT:
  340. .. rst-class:: classref-enumeration-constant
  341. :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` **HINGE_JOINT_FLAG_USE_LIMIT** = ``0``
  342. If ``true``, the Hinge has a maximum and a minimum rotation.
  343. .. _class_PhysicsServer_constant_HINGE_JOINT_FLAG_ENABLE_MOTOR:
  344. .. rst-class:: classref-enumeration-constant
  345. :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` **HINGE_JOINT_FLAG_ENABLE_MOTOR** = ``1``
  346. If ``true``, a motor turns the Hinge.
  347. .. rst-class:: classref-item-separator
  348. ----
  349. .. _enum_PhysicsServer_SliderJointParam:
  350. .. rst-class:: classref-enumeration
  351. enum **SliderJointParam**:
  352. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_LIMIT_UPPER:
  353. .. rst-class:: classref-enumeration-constant
  354. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = ``0``
  355. The maximum difference between the pivot points on their X axis before damping happens.
  356. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_LIMIT_LOWER:
  357. .. rst-class:: classref-enumeration-constant
  358. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = ``1``
  359. The minimum difference between the pivot points on their X axis before damping happens.
  360. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS:
  361. .. rst-class:: classref-enumeration-constant
  362. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS** = ``2``
  363. A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement.
  364. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION:
  365. .. rst-class:: classref-enumeration-constant
  366. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = ``3``
  367. The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost.
  368. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_LIMIT_DAMPING:
  369. .. rst-class:: classref-enumeration-constant
  370. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_LIMIT_DAMPING** = ``4``
  371. The amount of damping once the slider limits are surpassed.
  372. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_MOTION_SOFTNESS:
  373. .. rst-class:: classref-enumeration-constant
  374. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_MOTION_SOFTNESS** = ``5``
  375. A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement.
  376. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_MOTION_RESTITUTION:
  377. .. rst-class:: classref-enumeration-constant
  378. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_MOTION_RESTITUTION** = ``6``
  379. The amount of restitution inside the slider limits.
  380. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_MOTION_DAMPING:
  381. .. rst-class:: classref-enumeration-constant
  382. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_MOTION_DAMPING** = ``7``
  383. The amount of damping inside the slider limits.
  384. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS:
  385. .. rst-class:: classref-enumeration-constant
  386. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS** = ``8``
  387. A factor applied to the movement across axes orthogonal to the slider.
  388. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION:
  389. .. rst-class:: classref-enumeration-constant
  390. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION** = ``9``
  391. The amount of restitution when movement is across axes orthogonal to the slider.
  392. .. _class_PhysicsServer_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING:
  393. .. rst-class:: classref-enumeration-constant
  394. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING** = ``10``
  395. The amount of damping when movement is across axes orthogonal to the slider.
  396. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_LIMIT_UPPER:
  397. .. rst-class:: classref-enumeration-constant
  398. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_LIMIT_UPPER** = ``11``
  399. The upper limit of rotation in the slider.
  400. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_LIMIT_LOWER:
  401. .. rst-class:: classref-enumeration-constant
  402. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_LIMIT_LOWER** = ``12``
  403. The lower limit of rotation in the slider.
  404. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS:
  405. .. rst-class:: classref-enumeration-constant
  406. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS** = ``13``
  407. A factor applied to the all rotation once the limit is surpassed.
  408. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION:
  409. .. rst-class:: classref-enumeration-constant
  410. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION** = ``14``
  411. The amount of restitution of the rotation when the limit is surpassed.
  412. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_LIMIT_DAMPING:
  413. .. rst-class:: classref-enumeration-constant
  414. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_LIMIT_DAMPING** = ``15``
  415. The amount of damping of the rotation when the limit is surpassed.
  416. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS:
  417. .. rst-class:: classref-enumeration-constant
  418. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS** = ``16``
  419. A factor that gets applied to the all rotation in the limits.
  420. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION:
  421. .. rst-class:: classref-enumeration-constant
  422. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION** = ``17``
  423. The amount of restitution of the rotation in the limits.
  424. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_MOTION_DAMPING:
  425. .. rst-class:: classref-enumeration-constant
  426. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_MOTION_DAMPING** = ``18``
  427. The amount of damping of the rotation in the limits.
  428. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS:
  429. .. rst-class:: classref-enumeration-constant
  430. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS** = ``19``
  431. A factor that gets applied to the all rotation across axes orthogonal to the slider.
  432. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION:
  433. .. rst-class:: classref-enumeration-constant
  434. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION** = ``20``
  435. The amount of restitution of the rotation across axes orthogonal to the slider.
  436. .. _class_PhysicsServer_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING:
  437. .. rst-class:: classref-enumeration-constant
  438. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = ``21``
  439. The amount of damping of the rotation across axes orthogonal to the slider.
  440. .. _class_PhysicsServer_constant_SLIDER_JOINT_MAX:
  441. .. rst-class:: classref-enumeration-constant
  442. :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` **SLIDER_JOINT_MAX** = ``22``
  443. Represents the size of the :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` enum.
  444. .. rst-class:: classref-item-separator
  445. ----
  446. .. _enum_PhysicsServer_ConeTwistJointParam:
  447. .. rst-class:: classref-enumeration
  448. enum **ConeTwistJointParam**:
  449. .. _class_PhysicsServer_constant_CONE_TWIST_JOINT_SWING_SPAN:
  450. .. rst-class:: classref-enumeration-constant
  451. :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` **CONE_TWIST_JOINT_SWING_SPAN** = ``0``
  452. Swing is rotation from side to side, around the axis perpendicular to the twist axis.
  453. The swing span defines, how much rotation will not get corrected along the swing axis.
  454. Could be defined as looseness in the :ref:`ConeTwistJoint<class_ConeTwistJoint>`.
  455. If below 0.05, this behavior is locked.
  456. .. _class_PhysicsServer_constant_CONE_TWIST_JOINT_TWIST_SPAN:
  457. .. rst-class:: classref-enumeration-constant
  458. :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` **CONE_TWIST_JOINT_TWIST_SPAN** = ``1``
  459. Twist is the rotation around the twist axis, this value defined how far the joint can twist.
  460. Twist is locked if below 0.05.
  461. .. _class_PhysicsServer_constant_CONE_TWIST_JOINT_BIAS:
  462. .. rst-class:: classref-enumeration-constant
  463. :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` **CONE_TWIST_JOINT_BIAS** = ``2``
  464. The speed with which the swing or twist will take place.
  465. The higher, the faster.
  466. .. _class_PhysicsServer_constant_CONE_TWIST_JOINT_SOFTNESS:
  467. .. rst-class:: classref-enumeration-constant
  468. :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` **CONE_TWIST_JOINT_SOFTNESS** = ``3``
  469. The ease with which the Joint twists, if it's too low, it takes more force to twist the joint.
  470. .. _class_PhysicsServer_constant_CONE_TWIST_JOINT_RELAXATION:
  471. .. rst-class:: classref-enumeration-constant
  472. :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` **CONE_TWIST_JOINT_RELAXATION** = ``4``
  473. Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
  474. .. rst-class:: classref-item-separator
  475. ----
  476. .. _enum_PhysicsServer_G6DOFJointAxisParam:
  477. .. rst-class:: classref-enumeration
  478. enum **G6DOFJointAxisParam**:
  479. .. _class_PhysicsServer_constant_G6DOF_JOINT_LINEAR_LOWER_LIMIT:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_LOWER_LIMIT** = ``0``
  482. The minimum difference between the pivot points' axes.
  483. .. _class_PhysicsServer_constant_G6DOF_JOINT_LINEAR_UPPER_LIMIT:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_UPPER_LIMIT** = ``1``
  486. The maximum difference between the pivot points' axes.
  487. .. _class_PhysicsServer_constant_G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS:
  488. .. rst-class:: classref-enumeration-constant
  489. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = ``2``
  490. A factor that gets applied to the movement across the axes. The lower, the slower the movement.
  491. .. _class_PhysicsServer_constant_G6DOF_JOINT_LINEAR_RESTITUTION:
  492. .. rst-class:: classref-enumeration-constant
  493. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_RESTITUTION** = ``3``
  494. The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost.
  495. .. _class_PhysicsServer_constant_G6DOF_JOINT_LINEAR_DAMPING:
  496. .. rst-class:: classref-enumeration-constant
  497. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_DAMPING** = ``4``
  498. The amount of damping that happens at the linear motion across the axes.
  499. .. _class_PhysicsServer_constant_G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY:
  500. .. rst-class:: classref-enumeration-constant
  501. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY** = ``5``
  502. The velocity that the joint's linear motor will attempt to reach.
  503. .. _class_PhysicsServer_constant_G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT:
  504. .. rst-class:: classref-enumeration-constant
  505. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT** = ``6``
  506. The maximum force that the linear motor can apply while trying to reach the target velocity.
  507. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_LOWER_LIMIT:
  508. .. rst-class:: classref-enumeration-constant
  509. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = ``10``
  510. The minimum rotation in negative direction to break loose and rotate around the axes.
  511. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_UPPER_LIMIT:
  512. .. rst-class:: classref-enumeration-constant
  513. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = ``11``
  514. The minimum rotation in positive direction to break loose and rotate around the axes.
  515. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS:
  516. .. rst-class:: classref-enumeration-constant
  517. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = ``12``
  518. A factor that gets multiplied onto all rotations across the axes.
  519. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_DAMPING:
  520. .. rst-class:: classref-enumeration-constant
  521. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_DAMPING** = ``13``
  522. The amount of rotational damping across the axes. The lower, the more dampening occurs.
  523. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_RESTITUTION:
  524. .. rst-class:: classref-enumeration-constant
  525. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_RESTITUTION** = ``14``
  526. The amount of rotational restitution across the axes. The lower, the more restitution occurs.
  527. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_FORCE_LIMIT:
  528. .. rst-class:: classref-enumeration-constant
  529. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = ``15``
  530. The maximum amount of force that can occur, when rotating around the axes.
  531. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_ERP:
  532. .. rst-class:: classref-enumeration-constant
  533. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_ERP** = ``16``
  534. When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
  535. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY:
  536. .. rst-class:: classref-enumeration-constant
  537. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = ``17``
  538. Target speed for the motor at the axes.
  539. .. _class_PhysicsServer_constant_G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = ``18``
  542. Maximum acceleration for the motor at the axes.
  543. .. rst-class:: classref-item-separator
  544. ----
  545. .. _enum_PhysicsServer_G6DOFJointAxisFlag:
  546. .. rst-class:: classref-enumeration
  547. enum **G6DOFJointAxisFlag**:
  548. .. _class_PhysicsServer_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT:
  549. .. rst-class:: classref-enumeration-constant
  550. :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = ``0``
  551. If set, linear motion is possible within the given limits.
  552. .. _class_PhysicsServer_constant_G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT:
  553. .. rst-class:: classref-enumeration-constant
  554. :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = ``1``
  555. If set, rotational motion is possible.
  556. .. _class_PhysicsServer_constant_G6DOF_JOINT_FLAG_ENABLE_MOTOR:
  557. .. rst-class:: classref-enumeration-constant
  558. :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = ``4``
  559. If set, there is a rotational motor across these axes.
  560. .. _class_PhysicsServer_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR:
  561. .. rst-class:: classref-enumeration-constant
  562. :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` **G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR** = ``5``
  563. If set, there is a linear motor on this axis that targets a specific velocity.
  564. .. rst-class:: classref-item-separator
  565. ----
  566. .. _enum_PhysicsServer_ShapeType:
  567. .. rst-class:: classref-enumeration
  568. enum **ShapeType**:
  569. .. _class_PhysicsServer_constant_SHAPE_PLANE:
  570. .. rst-class:: classref-enumeration-constant
  571. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_PLANE** = ``0``
  572. The :ref:`Shape<class_Shape>` is a :ref:`PlaneShape<class_PlaneShape>`.
  573. .. _class_PhysicsServer_constant_SHAPE_RAY:
  574. .. rst-class:: classref-enumeration-constant
  575. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_RAY** = ``1``
  576. The :ref:`Shape<class_Shape>` is a :ref:`RayShape<class_RayShape>`.
  577. .. _class_PhysicsServer_constant_SHAPE_SPHERE:
  578. .. rst-class:: classref-enumeration-constant
  579. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_SPHERE** = ``2``
  580. The :ref:`Shape<class_Shape>` is a :ref:`SphereShape<class_SphereShape>`.
  581. .. _class_PhysicsServer_constant_SHAPE_BOX:
  582. .. rst-class:: classref-enumeration-constant
  583. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_BOX** = ``3``
  584. The :ref:`Shape<class_Shape>` is a :ref:`BoxShape<class_BoxShape>`.
  585. .. _class_PhysicsServer_constant_SHAPE_CAPSULE:
  586. .. rst-class:: classref-enumeration-constant
  587. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_CAPSULE** = ``4``
  588. The :ref:`Shape<class_Shape>` is a :ref:`CapsuleShape<class_CapsuleShape>`.
  589. .. _class_PhysicsServer_constant_SHAPE_CYLINDER:
  590. .. rst-class:: classref-enumeration-constant
  591. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_CYLINDER** = ``5``
  592. The :ref:`Shape<class_Shape>` is a :ref:`CylinderShape<class_CylinderShape>`.
  593. .. _class_PhysicsServer_constant_SHAPE_CONVEX_POLYGON:
  594. .. rst-class:: classref-enumeration-constant
  595. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_CONVEX_POLYGON** = ``6``
  596. The :ref:`Shape<class_Shape>` is a :ref:`ConvexPolygonShape<class_ConvexPolygonShape>`.
  597. .. _class_PhysicsServer_constant_SHAPE_CONCAVE_POLYGON:
  598. .. rst-class:: classref-enumeration-constant
  599. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_CONCAVE_POLYGON** = ``7``
  600. The :ref:`Shape<class_Shape>` is a :ref:`ConcavePolygonShape<class_ConcavePolygonShape>`.
  601. .. _class_PhysicsServer_constant_SHAPE_HEIGHTMAP:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_HEIGHTMAP** = ``8``
  604. The :ref:`Shape<class_Shape>` is a :ref:`HeightMapShape<class_HeightMapShape>`.
  605. .. _class_PhysicsServer_constant_SHAPE_CUSTOM:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **SHAPE_CUSTOM** = ``9``
  608. This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _enum_PhysicsServer_AreaParameter:
  612. .. rst-class:: classref-enumeration
  613. enum **AreaParameter**:
  614. .. _class_PhysicsServer_constant_AREA_PARAM_GRAVITY:
  615. .. rst-class:: classref-enumeration-constant
  616. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_GRAVITY** = ``0``
  617. Constant to set/get gravity strength in an area.
  618. .. _class_PhysicsServer_constant_AREA_PARAM_GRAVITY_VECTOR:
  619. .. rst-class:: classref-enumeration-constant
  620. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_GRAVITY_VECTOR** = ``1``
  621. Constant to set/get gravity vector/center in an area.
  622. .. _class_PhysicsServer_constant_AREA_PARAM_GRAVITY_IS_POINT:
  623. .. rst-class:: classref-enumeration-constant
  624. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_GRAVITY_IS_POINT** = ``2``
  625. Constant to set/get whether the gravity vector of an area is a direction, or a center point.
  626. .. _class_PhysicsServer_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE:
  627. .. rst-class:: classref-enumeration-constant
  628. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = ``3``
  629. Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
  630. .. _class_PhysicsServer_constant_AREA_PARAM_GRAVITY_POINT_ATTENUATION:
  631. .. rst-class:: classref-enumeration-constant
  632. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = ``4``
  633. This constant was used to set/get the falloff factor for point gravity. It has been superseded by :ref:`AREA_PARAM_GRAVITY_DISTANCE_SCALE<class_PhysicsServer_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE>`.
  634. .. _class_PhysicsServer_constant_AREA_PARAM_LINEAR_DAMP:
  635. .. rst-class:: classref-enumeration-constant
  636. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_LINEAR_DAMP** = ``5``
  637. Constant to set/get the linear dampening factor of an area.
  638. .. _class_PhysicsServer_constant_AREA_PARAM_ANGULAR_DAMP:
  639. .. rst-class:: classref-enumeration-constant
  640. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_ANGULAR_DAMP** = ``6``
  641. Constant to set/get the angular dampening factor of an area.
  642. .. _class_PhysicsServer_constant_AREA_PARAM_PRIORITY:
  643. .. rst-class:: classref-enumeration-constant
  644. :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` **AREA_PARAM_PRIORITY** = ``7``
  645. Constant to set/get the priority (order of processing) of an area.
  646. .. rst-class:: classref-item-separator
  647. ----
  648. .. _enum_PhysicsServer_AreaSpaceOverrideMode:
  649. .. rst-class:: classref-enumeration
  650. enum **AreaSpaceOverrideMode**:
  651. .. _class_PhysicsServer_constant_AREA_SPACE_OVERRIDE_DISABLED:
  652. .. rst-class:: classref-enumeration-constant
  653. :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` **AREA_SPACE_OVERRIDE_DISABLED** = ``0``
  654. This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
  655. .. _class_PhysicsServer_constant_AREA_SPACE_OVERRIDE_COMBINE:
  656. .. rst-class:: classref-enumeration-constant
  657. :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` **AREA_SPACE_OVERRIDE_COMBINE** = ``1``
  658. This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
  659. .. _class_PhysicsServer_constant_AREA_SPACE_OVERRIDE_COMBINE_REPLACE:
  660. .. rst-class:: classref-enumeration-constant
  661. :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = ``2``
  662. This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
  663. .. _class_PhysicsServer_constant_AREA_SPACE_OVERRIDE_REPLACE:
  664. .. rst-class:: classref-enumeration-constant
  665. :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` **AREA_SPACE_OVERRIDE_REPLACE** = ``3``
  666. This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
  667. .. _class_PhysicsServer_constant_AREA_SPACE_OVERRIDE_REPLACE_COMBINE:
  668. .. rst-class:: classref-enumeration-constant
  669. :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = ``4``
  670. This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
  671. .. rst-class:: classref-item-separator
  672. ----
  673. .. _enum_PhysicsServer_BodyMode:
  674. .. rst-class:: classref-enumeration
  675. enum **BodyMode**:
  676. .. _class_PhysicsServer_constant_BODY_MODE_STATIC:
  677. .. rst-class:: classref-enumeration-constant
  678. :ref:`BodyMode<enum_PhysicsServer_BodyMode>` **BODY_MODE_STATIC** = ``0``
  679. Constant for static bodies.
  680. .. _class_PhysicsServer_constant_BODY_MODE_KINEMATIC:
  681. .. rst-class:: classref-enumeration-constant
  682. :ref:`BodyMode<enum_PhysicsServer_BodyMode>` **BODY_MODE_KINEMATIC** = ``1``
  683. Constant for kinematic bodies.
  684. .. _class_PhysicsServer_constant_BODY_MODE_RIGID:
  685. .. rst-class:: classref-enumeration-constant
  686. :ref:`BodyMode<enum_PhysicsServer_BodyMode>` **BODY_MODE_RIGID** = ``2``
  687. Constant for rigid bodies.
  688. .. _class_PhysicsServer_constant_BODY_MODE_CHARACTER:
  689. .. rst-class:: classref-enumeration-constant
  690. :ref:`BodyMode<enum_PhysicsServer_BodyMode>` **BODY_MODE_CHARACTER** = ``3``
  691. Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics.
  692. .. rst-class:: classref-item-separator
  693. ----
  694. .. _enum_PhysicsServer_BodyParameter:
  695. .. rst-class:: classref-enumeration
  696. enum **BodyParameter**:
  697. .. _class_PhysicsServer_constant_BODY_PARAM_BOUNCE:
  698. .. rst-class:: classref-enumeration-constant
  699. :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` **BODY_PARAM_BOUNCE** = ``0``
  700. Constant to set/get a body's bounce factor.
  701. .. _class_PhysicsServer_constant_BODY_PARAM_FRICTION:
  702. .. rst-class:: classref-enumeration-constant
  703. :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` **BODY_PARAM_FRICTION** = ``1``
  704. Constant to set/get a body's friction.
  705. .. _class_PhysicsServer_constant_BODY_PARAM_MASS:
  706. .. rst-class:: classref-enumeration-constant
  707. :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` **BODY_PARAM_MASS** = ``2``
  708. Constant to set/get a body's mass.
  709. .. _class_PhysicsServer_constant_BODY_PARAM_GRAVITY_SCALE:
  710. .. rst-class:: classref-enumeration-constant
  711. :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` **BODY_PARAM_GRAVITY_SCALE** = ``3``
  712. Constant to set/get a body's gravity multiplier.
  713. .. _class_PhysicsServer_constant_BODY_PARAM_LINEAR_DAMP:
  714. .. rst-class:: classref-enumeration-constant
  715. :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` **BODY_PARAM_LINEAR_DAMP** = ``4``
  716. Constant to set/get a body's linear dampening factor.
  717. .. _class_PhysicsServer_constant_BODY_PARAM_ANGULAR_DAMP:
  718. .. rst-class:: classref-enumeration-constant
  719. :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` **BODY_PARAM_ANGULAR_DAMP** = ``5``
  720. Constant to set/get a body's angular dampening factor.
  721. .. _class_PhysicsServer_constant_BODY_PARAM_MAX:
  722. .. rst-class:: classref-enumeration-constant
  723. :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` **BODY_PARAM_MAX** = ``6``
  724. Represents the size of the :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` enum.
  725. .. rst-class:: classref-item-separator
  726. ----
  727. .. _enum_PhysicsServer_BodyState:
  728. .. rst-class:: classref-enumeration
  729. enum **BodyState**:
  730. .. _class_PhysicsServer_constant_BODY_STATE_TRANSFORM:
  731. .. rst-class:: classref-enumeration-constant
  732. :ref:`BodyState<enum_PhysicsServer_BodyState>` **BODY_STATE_TRANSFORM** = ``0``
  733. Constant to set/get the current transform matrix of the body.
  734. .. _class_PhysicsServer_constant_BODY_STATE_LINEAR_VELOCITY:
  735. .. rst-class:: classref-enumeration-constant
  736. :ref:`BodyState<enum_PhysicsServer_BodyState>` **BODY_STATE_LINEAR_VELOCITY** = ``1``
  737. Constant to set/get the current linear velocity of the body.
  738. .. _class_PhysicsServer_constant_BODY_STATE_ANGULAR_VELOCITY:
  739. .. rst-class:: classref-enumeration-constant
  740. :ref:`BodyState<enum_PhysicsServer_BodyState>` **BODY_STATE_ANGULAR_VELOCITY** = ``2``
  741. Constant to set/get the current angular velocity of the body.
  742. .. _class_PhysicsServer_constant_BODY_STATE_SLEEPING:
  743. .. rst-class:: classref-enumeration-constant
  744. :ref:`BodyState<enum_PhysicsServer_BodyState>` **BODY_STATE_SLEEPING** = ``3``
  745. Constant to sleep/wake up a body, or to get whether it is sleeping.
  746. .. _class_PhysicsServer_constant_BODY_STATE_CAN_SLEEP:
  747. .. rst-class:: classref-enumeration-constant
  748. :ref:`BodyState<enum_PhysicsServer_BodyState>` **BODY_STATE_CAN_SLEEP** = ``4``
  749. Constant to set/get whether the body can sleep.
  750. .. rst-class:: classref-item-separator
  751. ----
  752. .. _enum_PhysicsServer_AreaBodyStatus:
  753. .. rst-class:: classref-enumeration
  754. enum **AreaBodyStatus**:
  755. .. _class_PhysicsServer_constant_AREA_BODY_ADDED:
  756. .. rst-class:: classref-enumeration-constant
  757. :ref:`AreaBodyStatus<enum_PhysicsServer_AreaBodyStatus>` **AREA_BODY_ADDED** = ``0``
  758. The value of the first parameter and area callback function receives, when an object enters one of its shapes.
  759. .. _class_PhysicsServer_constant_AREA_BODY_REMOVED:
  760. .. rst-class:: classref-enumeration-constant
  761. :ref:`AreaBodyStatus<enum_PhysicsServer_AreaBodyStatus>` **AREA_BODY_REMOVED** = ``1``
  762. The value of the first parameter and area callback function receives, when an object exits one of its shapes.
  763. .. rst-class:: classref-item-separator
  764. ----
  765. .. _enum_PhysicsServer_ProcessInfo:
  766. .. rst-class:: classref-enumeration
  767. enum **ProcessInfo**:
  768. .. _class_PhysicsServer_constant_INFO_ACTIVE_OBJECTS:
  769. .. rst-class:: classref-enumeration-constant
  770. :ref:`ProcessInfo<enum_PhysicsServer_ProcessInfo>` **INFO_ACTIVE_OBJECTS** = ``0``
  771. Constant to get the number of objects that are not sleeping.
  772. .. _class_PhysicsServer_constant_INFO_COLLISION_PAIRS:
  773. .. rst-class:: classref-enumeration-constant
  774. :ref:`ProcessInfo<enum_PhysicsServer_ProcessInfo>` **INFO_COLLISION_PAIRS** = ``1``
  775. Constant to get the number of possible collisions.
  776. .. _class_PhysicsServer_constant_INFO_ISLAND_COUNT:
  777. .. rst-class:: classref-enumeration-constant
  778. :ref:`ProcessInfo<enum_PhysicsServer_ProcessInfo>` **INFO_ISLAND_COUNT** = ``2``
  779. Constant to get the number of space regions where a collision could occur.
  780. .. rst-class:: classref-item-separator
  781. ----
  782. .. _enum_PhysicsServer_SpaceParameter:
  783. .. rst-class:: classref-enumeration
  784. enum **SpaceParameter**:
  785. .. _class_PhysicsServer_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS:
  786. .. rst-class:: classref-enumeration-constant
  787. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = ``0``
  788. Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
  789. .. _class_PhysicsServer_constant_SPACE_PARAM_CONTACT_MAX_SEPARATION:
  790. .. rst-class:: classref-enumeration-constant
  791. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_CONTACT_MAX_SEPARATION** = ``1``
  792. Constant to set/get the maximum distance a shape can be from another before they are considered separated.
  793. .. _class_PhysicsServer_constant_SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION:
  794. .. rst-class:: classref-enumeration-constant
  795. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION** = ``2``
  796. Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
  797. .. _class_PhysicsServer_constant_SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD:
  798. .. rst-class:: classref-enumeration-constant
  799. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = ``3``
  800. Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
  801. .. _class_PhysicsServer_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD:
  802. .. rst-class:: classref-enumeration-constant
  803. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = ``4``
  804. Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
  805. .. _class_PhysicsServer_constant_SPACE_PARAM_BODY_TIME_TO_SLEEP:
  806. .. rst-class:: classref-enumeration-constant
  807. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_BODY_TIME_TO_SLEEP** = ``5``
  808. Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
  809. .. _class_PhysicsServer_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO:
  810. .. rst-class:: classref-enumeration-constant
  811. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO** = ``6``
  812. .. _class_PhysicsServer_constant_SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
  813. .. rst-class:: classref-enumeration-constant
  814. :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = ``7``
  815. Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
  816. .. rst-class:: classref-item-separator
  817. ----
  818. .. _enum_PhysicsServer_BodyAxis:
  819. .. rst-class:: classref-enumeration
  820. enum **BodyAxis**:
  821. .. _class_PhysicsServer_constant_BODY_AXIS_LINEAR_X:
  822. .. rst-class:: classref-enumeration-constant
  823. :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` **BODY_AXIS_LINEAR_X** = ``1``
  824. .. _class_PhysicsServer_constant_BODY_AXIS_LINEAR_Y:
  825. .. rst-class:: classref-enumeration-constant
  826. :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` **BODY_AXIS_LINEAR_Y** = ``2``
  827. .. _class_PhysicsServer_constant_BODY_AXIS_LINEAR_Z:
  828. .. rst-class:: classref-enumeration-constant
  829. :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` **BODY_AXIS_LINEAR_Z** = ``4``
  830. .. _class_PhysicsServer_constant_BODY_AXIS_ANGULAR_X:
  831. .. rst-class:: classref-enumeration-constant
  832. :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` **BODY_AXIS_ANGULAR_X** = ``8``
  833. .. _class_PhysicsServer_constant_BODY_AXIS_ANGULAR_Y:
  834. .. rst-class:: classref-enumeration-constant
  835. :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` **BODY_AXIS_ANGULAR_Y** = ``16``
  836. .. _class_PhysicsServer_constant_BODY_AXIS_ANGULAR_Z:
  837. .. rst-class:: classref-enumeration-constant
  838. :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` **BODY_AXIS_ANGULAR_Z** = ``32``
  839. .. rst-class:: classref-section-separator
  840. ----
  841. .. rst-class:: classref-descriptions-group
  842. Method Descriptions
  843. -------------------
  844. .. _class_PhysicsServer_method_area_add_shape:
  845. .. rst-class:: classref-method
  846. void **area_add_shape** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform<class_Transform>` transform=Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), :ref:`bool<class_bool>` disabled=false **)**
  847. Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
  848. .. rst-class:: classref-item-separator
  849. ----
  850. .. _class_PhysicsServer_method_area_attach_object_instance_id:
  851. .. rst-class:: classref-method
  852. void **area_attach_object_instance_id** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)**
  853. Assigns the area to a descendant of :ref:`Object<class_Object>`, so it can exist in the node tree.
  854. .. rst-class:: classref-item-separator
  855. ----
  856. .. _class_PhysicsServer_method_area_clear_shapes:
  857. .. rst-class:: classref-method
  858. void **area_clear_shapes** **(** :ref:`RID<class_RID>` area **)**
  859. Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later.
  860. .. rst-class:: classref-item-separator
  861. ----
  862. .. _class_PhysicsServer_method_area_create:
  863. .. rst-class:: classref-method
  864. :ref:`RID<class_RID>` **area_create** **(** **)**
  865. Creates an :ref:`Area<class_Area>`.
  866. .. rst-class:: classref-item-separator
  867. ----
  868. .. _class_PhysicsServer_method_area_get_object_instance_id:
  869. .. rst-class:: classref-method
  870. :ref:`int<class_int>` **area_get_object_instance_id** **(** :ref:`RID<class_RID>` area **)** |const|
  871. Gets the instance ID of the object the area is assigned to.
  872. .. rst-class:: classref-item-separator
  873. ----
  874. .. _class_PhysicsServer_method_area_get_param:
  875. .. rst-class:: classref-method
  876. :ref:`Variant<class_Variant>` **area_get_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` param **)** |const|
  877. Returns an area parameter value. A list of available parameters is on the :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` constants.
  878. .. rst-class:: classref-item-separator
  879. ----
  880. .. _class_PhysicsServer_method_area_get_shape:
  881. .. rst-class:: classref-method
  882. :ref:`RID<class_RID>` **area_get_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const|
  883. Returns the :ref:`RID<class_RID>` of the nth shape of an area.
  884. .. rst-class:: classref-item-separator
  885. ----
  886. .. _class_PhysicsServer_method_area_get_shape_count:
  887. .. rst-class:: classref-method
  888. :ref:`int<class_int>` **area_get_shape_count** **(** :ref:`RID<class_RID>` area **)** |const|
  889. Returns the number of shapes assigned to an area.
  890. .. rst-class:: classref-item-separator
  891. ----
  892. .. _class_PhysicsServer_method_area_get_shape_transform:
  893. .. rst-class:: classref-method
  894. :ref:`Transform<class_Transform>` **area_get_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const|
  895. Returns the transform matrix of a shape within an area.
  896. .. rst-class:: classref-item-separator
  897. ----
  898. .. _class_PhysicsServer_method_area_get_space:
  899. .. rst-class:: classref-method
  900. :ref:`RID<class_RID>` **area_get_space** **(** :ref:`RID<class_RID>` area **)** |const|
  901. Returns the space assigned to the area.
  902. .. rst-class:: classref-item-separator
  903. ----
  904. .. _class_PhysicsServer_method_area_get_space_override_mode:
  905. .. rst-class:: classref-method
  906. :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` **area_get_space_override_mode** **(** :ref:`RID<class_RID>` area **)** |const|
  907. Returns the space override mode for the area.
  908. .. rst-class:: classref-item-separator
  909. ----
  910. .. _class_PhysicsServer_method_area_get_transform:
  911. .. rst-class:: classref-method
  912. :ref:`Transform<class_Transform>` **area_get_transform** **(** :ref:`RID<class_RID>` area **)** |const|
  913. Returns the transform matrix for an area.
  914. .. rst-class:: classref-item-separator
  915. ----
  916. .. _class_PhysicsServer_method_area_is_ray_pickable:
  917. .. rst-class:: classref-method
  918. :ref:`bool<class_bool>` **area_is_ray_pickable** **(** :ref:`RID<class_RID>` area **)** |const|
  919. If ``true``, area collides with rays.
  920. .. rst-class:: classref-item-separator
  921. ----
  922. .. _class_PhysicsServer_method_area_remove_shape:
  923. .. rst-class:: classref-method
  924. void **area_remove_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)**
  925. Removes a shape from an area. It does not delete the shape, so it can be reassigned later.
  926. .. rst-class:: classref-item-separator
  927. ----
  928. .. _class_PhysicsServer_method_area_set_area_monitor_callback:
  929. .. rst-class:: classref-method
  930. void **area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` method **)**
  931. .. container:: contribute
  932. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  933. .. rst-class:: classref-item-separator
  934. ----
  935. .. _class_PhysicsServer_method_area_set_collision_layer:
  936. .. rst-class:: classref-method
  937. void **area_set_collision_layer** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)**
  938. Assigns the area to one or many physics layers.
  939. .. rst-class:: classref-item-separator
  940. ----
  941. .. _class_PhysicsServer_method_area_set_collision_mask:
  942. .. rst-class:: classref-method
  943. void **area_set_collision_mask** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)**
  944. Sets which physics layers the area will monitor.
  945. .. rst-class:: classref-item-separator
  946. ----
  947. .. _class_PhysicsServer_method_area_set_monitor_callback:
  948. .. rst-class:: classref-method
  949. void **area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` method **)**
  950. Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
  951. 1: :ref:`AREA_BODY_ADDED<class_PhysicsServer_constant_AREA_BODY_ADDED>` or :ref:`AREA_BODY_REMOVED<class_PhysicsServer_constant_AREA_BODY_REMOVED>`, depending on whether the object entered or exited the area.
  952. 2: :ref:`RID<class_RID>` of the object that entered/exited the area.
  953. 3: Instance ID of the object that entered/exited the area.
  954. 4: The shape index of the object that entered/exited the area.
  955. 5: The shape index of the area where the object entered/exited.
  956. .. rst-class:: classref-item-separator
  957. ----
  958. .. _class_PhysicsServer_method_area_set_monitorable:
  959. .. rst-class:: classref-method
  960. void **area_set_monitorable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)**
  961. .. container:: contribute
  962. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  963. .. rst-class:: classref-item-separator
  964. ----
  965. .. _class_PhysicsServer_method_area_set_param:
  966. .. rst-class:: classref-method
  967. void **area_set_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)**
  968. Sets the value for an area parameter. A list of available parameters is on the :ref:`AreaParameter<enum_PhysicsServer_AreaParameter>` constants.
  969. .. rst-class:: classref-item-separator
  970. ----
  971. .. _class_PhysicsServer_method_area_set_ray_pickable:
  972. .. rst-class:: classref-method
  973. void **area_set_ray_pickable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` enable **)**
  974. Sets object pickable with rays.
  975. .. rst-class:: classref-item-separator
  976. ----
  977. .. _class_PhysicsServer_method_area_set_shape:
  978. .. rst-class:: classref-method
  979. void **area_set_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)**
  980. Substitutes a given area shape by another. The old shape is selected by its index, the new one by its :ref:`RID<class_RID>`.
  981. .. rst-class:: classref-item-separator
  982. ----
  983. .. _class_PhysicsServer_method_area_set_shape_disabled:
  984. .. rst-class:: classref-method
  985. void **area_set_shape_disabled** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)**
  986. .. container:: contribute
  987. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  988. .. rst-class:: classref-item-separator
  989. ----
  990. .. _class_PhysicsServer_method_area_set_shape_transform:
  991. .. rst-class:: classref-method
  992. void **area_set_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform<class_Transform>` transform **)**
  993. Sets the transform matrix for an area shape.
  994. .. rst-class:: classref-item-separator
  995. ----
  996. .. _class_PhysicsServer_method_area_set_space:
  997. .. rst-class:: classref-method
  998. void **area_set_space** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)**
  999. Assigns a space to the area.
  1000. .. rst-class:: classref-item-separator
  1001. ----
  1002. .. _class_PhysicsServer_method_area_set_space_override_mode:
  1003. .. rst-class:: classref-method
  1004. void **area_set_space_override_mode** **(** :ref:`RID<class_RID>` area, :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` mode **)**
  1005. Sets the space override mode for the area. The modes are described in the :ref:`AreaSpaceOverrideMode<enum_PhysicsServer_AreaSpaceOverrideMode>` constants.
  1006. .. rst-class:: classref-item-separator
  1007. ----
  1008. .. _class_PhysicsServer_method_area_set_transform:
  1009. .. rst-class:: classref-method
  1010. void **area_set_transform** **(** :ref:`RID<class_RID>` area, :ref:`Transform<class_Transform>` transform **)**
  1011. Sets the transform matrix for an area.
  1012. .. rst-class:: classref-item-separator
  1013. ----
  1014. .. _class_PhysicsServer_method_body_add_central_force:
  1015. .. rst-class:: classref-method
  1016. void **body_add_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)**
  1017. .. container:: contribute
  1018. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1019. .. rst-class:: classref-item-separator
  1020. ----
  1021. .. _class_PhysicsServer_method_body_add_collision_exception:
  1022. .. rst-class:: classref-method
  1023. void **body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)**
  1024. Adds a body to the list of bodies exempt from collisions.
  1025. .. rst-class:: classref-item-separator
  1026. ----
  1027. .. _class_PhysicsServer_method_body_add_force:
  1028. .. rst-class:: classref-method
  1029. void **body_add_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)**
  1030. .. container:: contribute
  1031. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1032. .. rst-class:: classref-item-separator
  1033. ----
  1034. .. _class_PhysicsServer_method_body_add_shape:
  1035. .. rst-class:: classref-method
  1036. void **body_add_shape** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform<class_Transform>` transform=Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), :ref:`bool<class_bool>` disabled=false **)**
  1037. Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
  1038. .. rst-class:: classref-item-separator
  1039. ----
  1040. .. _class_PhysicsServer_method_body_add_torque:
  1041. .. rst-class:: classref-method
  1042. void **body_add_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)**
  1043. .. container:: contribute
  1044. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1045. .. rst-class:: classref-item-separator
  1046. ----
  1047. .. _class_PhysicsServer_method_body_apply_central_impulse:
  1048. .. rst-class:: classref-method
  1049. void **body_apply_central_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)**
  1050. .. container:: contribute
  1051. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1052. .. rst-class:: classref-item-separator
  1053. ----
  1054. .. _class_PhysicsServer_method_body_apply_impulse:
  1055. .. rst-class:: classref-method
  1056. void **body_apply_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` impulse **)**
  1057. Gives the body a push at a ``position`` in the direction of the ``impulse``.
  1058. .. rst-class:: classref-item-separator
  1059. ----
  1060. .. _class_PhysicsServer_method_body_apply_torque_impulse:
  1061. .. rst-class:: classref-method
  1062. void **body_apply_torque_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)**
  1063. Gives the body a push to rotate it.
  1064. .. rst-class:: classref-item-separator
  1065. ----
  1066. .. _class_PhysicsServer_method_body_attach_object_instance_id:
  1067. .. rst-class:: classref-method
  1068. void **body_attach_object_instance_id** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)**
  1069. Assigns the area to a descendant of :ref:`Object<class_Object>`, so it can exist in the node tree.
  1070. .. rst-class:: classref-item-separator
  1071. ----
  1072. .. _class_PhysicsServer_method_body_clear_shapes:
  1073. .. rst-class:: classref-method
  1074. void **body_clear_shapes** **(** :ref:`RID<class_RID>` body **)**
  1075. Removes all shapes from a body.
  1076. .. rst-class:: classref-item-separator
  1077. ----
  1078. .. _class_PhysicsServer_method_body_create:
  1079. .. rst-class:: classref-method
  1080. :ref:`RID<class_RID>` **body_create** **(** :ref:`BodyMode<enum_PhysicsServer_BodyMode>` mode=2, :ref:`bool<class_bool>` init_sleeping=false **)**
  1081. Creates a physics body. The first parameter can be any value from :ref:`BodyMode<enum_PhysicsServer_BodyMode>` constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
  1082. .. rst-class:: classref-item-separator
  1083. ----
  1084. .. _class_PhysicsServer_method_body_get_collision_layer:
  1085. .. rst-class:: classref-method
  1086. :ref:`int<class_int>` **body_get_collision_layer** **(** :ref:`RID<class_RID>` body **)** |const|
  1087. Returns the physics layer or layers a body belongs to.
  1088. .. rst-class:: classref-item-separator
  1089. ----
  1090. .. _class_PhysicsServer_method_body_get_collision_mask:
  1091. .. rst-class:: classref-method
  1092. :ref:`int<class_int>` **body_get_collision_mask** **(** :ref:`RID<class_RID>` body **)** |const|
  1093. Returns the physics layer or layers a body can collide with.
  1094. .. rst-class:: classref-item-separator
  1095. ----
  1096. .. _class_PhysicsServer_method_body_get_direct_state:
  1097. .. rst-class:: classref-method
  1098. :ref:`PhysicsDirectBodyState<class_PhysicsDirectBodyState>` **body_get_direct_state** **(** :ref:`RID<class_RID>` body **)**
  1099. Returns the :ref:`PhysicsDirectBodyState<class_PhysicsDirectBodyState>` of the body. Returns ``null`` if the body is destroyed or removed from the physics space.
  1100. .. rst-class:: classref-item-separator
  1101. ----
  1102. .. _class_PhysicsServer_method_body_get_kinematic_safe_margin:
  1103. .. rst-class:: classref-method
  1104. :ref:`float<class_float>` **body_get_kinematic_safe_margin** **(** :ref:`RID<class_RID>` body **)** |const|
  1105. .. container:: contribute
  1106. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1107. .. rst-class:: classref-item-separator
  1108. ----
  1109. .. _class_PhysicsServer_method_body_get_max_contacts_reported:
  1110. .. rst-class:: classref-method
  1111. :ref:`int<class_int>` **body_get_max_contacts_reported** **(** :ref:`RID<class_RID>` body **)** |const|
  1112. Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported<class_PhysicsServer_method_body_set_max_contacts_reported>`.
  1113. .. rst-class:: classref-item-separator
  1114. ----
  1115. .. _class_PhysicsServer_method_body_get_mode:
  1116. .. rst-class:: classref-method
  1117. :ref:`BodyMode<enum_PhysicsServer_BodyMode>` **body_get_mode** **(** :ref:`RID<class_RID>` body **)** |const|
  1118. Returns the body mode.
  1119. .. rst-class:: classref-item-separator
  1120. ----
  1121. .. _class_PhysicsServer_method_body_get_object_instance_id:
  1122. .. rst-class:: classref-method
  1123. :ref:`int<class_int>` **body_get_object_instance_id** **(** :ref:`RID<class_RID>` body **)** |const|
  1124. Gets the instance ID of the object the area is assigned to.
  1125. .. rst-class:: classref-item-separator
  1126. ----
  1127. .. _class_PhysicsServer_method_body_get_param:
  1128. .. rst-class:: classref-method
  1129. :ref:`float<class_float>` **body_get_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` param **)** |const|
  1130. Returns the value of a body parameter. A list of available parameters is on the :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` constants.
  1131. .. rst-class:: classref-item-separator
  1132. ----
  1133. .. _class_PhysicsServer_method_body_get_shape:
  1134. .. rst-class:: classref-method
  1135. :ref:`RID<class_RID>` **body_get_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const|
  1136. Returns the :ref:`RID<class_RID>` of the nth shape of a body.
  1137. .. rst-class:: classref-item-separator
  1138. ----
  1139. .. _class_PhysicsServer_method_body_get_shape_count:
  1140. .. rst-class:: classref-method
  1141. :ref:`int<class_int>` **body_get_shape_count** **(** :ref:`RID<class_RID>` body **)** |const|
  1142. Returns the number of shapes assigned to a body.
  1143. .. rst-class:: classref-item-separator
  1144. ----
  1145. .. _class_PhysicsServer_method_body_get_shape_transform:
  1146. .. rst-class:: classref-method
  1147. :ref:`Transform<class_Transform>` **body_get_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const|
  1148. Returns the transform matrix of a body shape.
  1149. .. rst-class:: classref-item-separator
  1150. ----
  1151. .. _class_PhysicsServer_method_body_get_space:
  1152. .. rst-class:: classref-method
  1153. :ref:`RID<class_RID>` **body_get_space** **(** :ref:`RID<class_RID>` body **)** |const|
  1154. Returns the :ref:`RID<class_RID>` of the space assigned to a body.
  1155. .. rst-class:: classref-item-separator
  1156. ----
  1157. .. _class_PhysicsServer_method_body_get_state:
  1158. .. rst-class:: classref-method
  1159. :ref:`Variant<class_Variant>` **body_get_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer_BodyState>` state **)** |const|
  1160. Returns a body state.
  1161. .. rst-class:: classref-item-separator
  1162. ----
  1163. .. _class_PhysicsServer_method_body_is_axis_locked:
  1164. .. rst-class:: classref-method
  1165. :ref:`bool<class_bool>` **body_is_axis_locked** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` axis **)** |const|
  1166. .. container:: contribute
  1167. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1168. .. rst-class:: classref-item-separator
  1169. ----
  1170. .. _class_PhysicsServer_method_body_is_continuous_collision_detection_enabled:
  1171. .. rst-class:: classref-method
  1172. :ref:`bool<class_bool>` **body_is_continuous_collision_detection_enabled** **(** :ref:`RID<class_RID>` body **)** |const|
  1173. If ``true``, the continuous collision detection mode is enabled.
  1174. .. rst-class:: classref-item-separator
  1175. ----
  1176. .. _class_PhysicsServer_method_body_is_omitting_force_integration:
  1177. .. rst-class:: classref-method
  1178. :ref:`bool<class_bool>` **body_is_omitting_force_integration** **(** :ref:`RID<class_RID>` body **)** |const|
  1179. Returns whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback<class_PhysicsServer_method_body_set_force_integration_callback>`).
  1180. .. rst-class:: classref-item-separator
  1181. ----
  1182. .. _class_PhysicsServer_method_body_is_ray_pickable:
  1183. .. rst-class:: classref-method
  1184. :ref:`bool<class_bool>` **body_is_ray_pickable** **(** :ref:`RID<class_RID>` body **)** |const|
  1185. If ``true``, the body can be detected by rays.
  1186. .. rst-class:: classref-item-separator
  1187. ----
  1188. .. _class_PhysicsServer_method_body_remove_collision_exception:
  1189. .. rst-class:: classref-method
  1190. void **body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)**
  1191. Removes a body from the list of bodies exempt from collisions.
  1192. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
  1193. .. rst-class:: classref-item-separator
  1194. ----
  1195. .. _class_PhysicsServer_method_body_remove_shape:
  1196. .. rst-class:: classref-method
  1197. void **body_remove_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)**
  1198. Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
  1199. .. rst-class:: classref-item-separator
  1200. ----
  1201. .. _class_PhysicsServer_method_body_set_axis_lock:
  1202. .. rst-class:: classref-method
  1203. void **body_set_axis_lock** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)**
  1204. .. container:: contribute
  1205. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1206. .. rst-class:: classref-item-separator
  1207. ----
  1208. .. _class_PhysicsServer_method_body_set_axis_velocity:
  1209. .. rst-class:: classref-method
  1210. void **body_set_axis_velocity** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` axis_velocity **)**
  1211. Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
  1212. .. rst-class:: classref-item-separator
  1213. ----
  1214. .. _class_PhysicsServer_method_body_set_collision_layer:
  1215. .. rst-class:: classref-method
  1216. void **body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)**
  1217. Sets the physics layer or layers a body belongs to.
  1218. .. rst-class:: classref-item-separator
  1219. ----
  1220. .. _class_PhysicsServer_method_body_set_collision_mask:
  1221. .. rst-class:: classref-method
  1222. void **body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)**
  1223. Sets the physics layer or layers a body can collide with.
  1224. .. rst-class:: classref-item-separator
  1225. ----
  1226. .. _class_PhysicsServer_method_body_set_enable_continuous_collision_detection:
  1227. .. rst-class:: classref-method
  1228. void **body_set_enable_continuous_collision_detection** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)**
  1229. If ``true``, the continuous collision detection mode is enabled.
  1230. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
  1231. .. rst-class:: classref-item-separator
  1232. ----
  1233. .. _class_PhysicsServer_method_body_set_force_integration_callback:
  1234. .. rst-class:: classref-method
  1235. void **body_set_force_integration_callback** **(** :ref:`RID<class_RID>` body, :ref:`Object<class_Object>` receiver, :ref:`String<class_String>` method, :ref:`Variant<class_Variant>` userdata=null **)**
  1236. Sets the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force_integration<class_PhysicsServer_method_body_set_omit_force_integration>`).
  1237. .. rst-class:: classref-item-separator
  1238. ----
  1239. .. _class_PhysicsServer_method_body_set_kinematic_safe_margin:
  1240. .. rst-class:: classref-method
  1241. void **body_set_kinematic_safe_margin** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` margin **)**
  1242. .. container:: contribute
  1243. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1244. .. rst-class:: classref-item-separator
  1245. ----
  1246. .. _class_PhysicsServer_method_body_set_max_contacts_reported:
  1247. .. rst-class:: classref-method
  1248. void **body_set_max_contacts_reported** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)**
  1249. Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
  1250. .. rst-class:: classref-item-separator
  1251. ----
  1252. .. _class_PhysicsServer_method_body_set_mode:
  1253. .. rst-class:: classref-method
  1254. void **body_set_mode** **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer_BodyMode>` mode **)**
  1255. Sets the body mode, from one of the :ref:`BodyMode<enum_PhysicsServer_BodyMode>` constants.
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_PhysicsServer_method_body_set_omit_force_integration:
  1259. .. rst-class:: classref-method
  1260. void **body_set_omit_force_integration** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)**
  1261. Sets whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback<class_PhysicsServer_method_body_set_force_integration_callback>`).
  1262. .. rst-class:: classref-item-separator
  1263. ----
  1264. .. _class_PhysicsServer_method_body_set_param:
  1265. .. rst-class:: classref-method
  1266. void **body_set_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` param, :ref:`float<class_float>` value **)**
  1267. Sets a body parameter. A list of available parameters is on the :ref:`BodyParameter<enum_PhysicsServer_BodyParameter>` constants.
  1268. .. rst-class:: classref-item-separator
  1269. ----
  1270. .. _class_PhysicsServer_method_body_set_ray_pickable:
  1271. .. rst-class:: classref-method
  1272. void **body_set_ray_pickable** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)**
  1273. Sets the body pickable with rays if ``enabled`` is set.
  1274. .. rst-class:: classref-item-separator
  1275. ----
  1276. .. _class_PhysicsServer_method_body_set_shape:
  1277. .. rst-class:: classref-method
  1278. void **body_set_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)**
  1279. Substitutes a given body shape by another. The old shape is selected by its index, the new one by its :ref:`RID<class_RID>`.
  1280. .. rst-class:: classref-item-separator
  1281. ----
  1282. .. _class_PhysicsServer_method_body_set_shape_disabled:
  1283. .. rst-class:: classref-method
  1284. void **body_set_shape_disabled** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)**
  1285. .. container:: contribute
  1286. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  1287. .. rst-class:: classref-item-separator
  1288. ----
  1289. .. _class_PhysicsServer_method_body_set_shape_transform:
  1290. .. rst-class:: classref-method
  1291. void **body_set_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform<class_Transform>` transform **)**
  1292. Sets the transform matrix for a body shape.
  1293. .. rst-class:: classref-item-separator
  1294. ----
  1295. .. _class_PhysicsServer_method_body_set_space:
  1296. .. rst-class:: classref-method
  1297. void **body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)**
  1298. Assigns a space to the body (see :ref:`space_create<class_PhysicsServer_method_space_create>`).
  1299. .. rst-class:: classref-item-separator
  1300. ----
  1301. .. _class_PhysicsServer_method_body_set_state:
  1302. .. rst-class:: classref-method
  1303. void **body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer_BodyState>` state, :ref:`Variant<class_Variant>` value **)**
  1304. Sets a body state (see :ref:`BodyState<enum_PhysicsServer_BodyState>` constants).
  1305. .. rst-class:: classref-item-separator
  1306. ----
  1307. .. _class_PhysicsServer_method_body_test_motion:
  1308. .. rst-class:: classref-method
  1309. :ref:`bool<class_bool>` **body_test_motion** **(** :ref:`RID<class_RID>` body, :ref:`Transform<class_Transform>` from, :ref:`Vector3<class_Vector3>` motion, :ref:`bool<class_bool>` infinite_inertia, :ref:`PhysicsTestMotionResult<class_PhysicsTestMotionResult>` result=null, :ref:`bool<class_bool>` exclude_raycast_shapes=true, :ref:`Array<class_Array>` exclude=[ ] **)**
  1310. Returns ``true`` if a collision would result from moving in the given direction from a given point in space. :ref:`PhysicsTestMotionResult<class_PhysicsTestMotionResult>` can be passed to return additional information in.
  1311. .. rst-class:: classref-item-separator
  1312. ----
  1313. .. _class_PhysicsServer_method_cone_twist_joint_get_param:
  1314. .. rst-class:: classref-method
  1315. :ref:`float<class_float>` **cone_twist_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` param **)** |const|
  1316. Gets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` constants).
  1317. .. rst-class:: classref-item-separator
  1318. ----
  1319. .. _class_PhysicsServer_method_cone_twist_joint_set_param:
  1320. .. rst-class:: classref-method
  1321. void **cone_twist_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` param, :ref:`float<class_float>` value **)**
  1322. Sets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsServer_ConeTwistJointParam>` constants).
  1323. .. rst-class:: classref-item-separator
  1324. ----
  1325. .. _class_PhysicsServer_method_free_rid:
  1326. .. rst-class:: classref-method
  1327. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  1328. Destroys an object created by the PhysicsServer.
  1329. \ **Note:** See :ref:`VisualServer.free_rid<class_VisualServer_method_free_rid>` for details on how to handle RIDs for freed objects.
  1330. .. rst-class:: classref-item-separator
  1331. ----
  1332. .. _class_PhysicsServer_method_generic_6dof_joint_get_flag:
  1333. .. rst-class:: classref-method
  1334. :ref:`bool<class_bool>` **generic_6dof_joint_get_flag** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` flag **)**
  1335. Gets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` constants).
  1336. .. rst-class:: classref-item-separator
  1337. ----
  1338. .. _class_PhysicsServer_method_generic_6dof_joint_get_param:
  1339. .. rst-class:: classref-method
  1340. :ref:`float<class_float>` **generic_6dof_joint_get_param** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` param **)**
  1341. Gets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` constants).
  1342. .. rst-class:: classref-item-separator
  1343. ----
  1344. .. _class_PhysicsServer_method_generic_6dof_joint_set_flag:
  1345. .. rst-class:: classref-method
  1346. void **generic_6dof_joint_set_flag** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` flag, :ref:`bool<class_bool>` enable **)**
  1347. Sets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag<enum_PhysicsServer_G6DOFJointAxisFlag>` constants).
  1348. .. rst-class:: classref-item-separator
  1349. ----
  1350. .. _class_PhysicsServer_method_generic_6dof_joint_set_param:
  1351. .. rst-class:: classref-method
  1352. void **generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` param, :ref:`float<class_float>` value **)**
  1353. Sets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam<enum_PhysicsServer_G6DOFJointAxisParam>` constants).
  1354. .. rst-class:: classref-item-separator
  1355. ----
  1356. .. _class_PhysicsServer_method_get_process_info:
  1357. .. rst-class:: classref-method
  1358. :ref:`int<class_int>` **get_process_info** **(** :ref:`ProcessInfo<enum_PhysicsServer_ProcessInfo>` process_info **)**
  1359. Returns information about the current state of the 3D physics engine. See :ref:`ProcessInfo<enum_PhysicsServer_ProcessInfo>` for a list of available states. Only implemented for Godot Physics.
  1360. .. rst-class:: classref-item-separator
  1361. ----
  1362. .. _class_PhysicsServer_method_hinge_joint_get_flag:
  1363. .. rst-class:: classref-method
  1364. :ref:`bool<class_bool>` **hinge_joint_get_flag** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` flag **)** |const|
  1365. Gets a hinge_joint flag (see :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` constants).
  1366. .. rst-class:: classref-item-separator
  1367. ----
  1368. .. _class_PhysicsServer_method_hinge_joint_get_param:
  1369. .. rst-class:: classref-method
  1370. :ref:`float<class_float>` **hinge_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` param **)** |const|
  1371. Gets a hinge_joint parameter (see :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>`).
  1372. .. rst-class:: classref-item-separator
  1373. ----
  1374. .. _class_PhysicsServer_method_hinge_joint_set_flag:
  1375. .. rst-class:: classref-method
  1376. void **hinge_joint_set_flag** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` flag, :ref:`bool<class_bool>` enabled **)**
  1377. Sets a hinge_joint flag (see :ref:`HingeJointFlag<enum_PhysicsServer_HingeJointFlag>` constants).
  1378. .. rst-class:: classref-item-separator
  1379. ----
  1380. .. _class_PhysicsServer_method_hinge_joint_set_param:
  1381. .. rst-class:: classref-method
  1382. void **hinge_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` param, :ref:`float<class_float>` value **)**
  1383. Sets a hinge_joint parameter (see :ref:`HingeJointParam<enum_PhysicsServer_HingeJointParam>` constants).
  1384. .. rst-class:: classref-item-separator
  1385. ----
  1386. .. _class_PhysicsServer_method_joint_create_cone_twist:
  1387. .. rst-class:: classref-method
  1388. :ref:`RID<class_RID>` **joint_create_cone_twist** **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` local_ref_B **)**
  1389. Creates a :ref:`ConeTwistJoint<class_ConeTwistJoint>`.
  1390. .. rst-class:: classref-item-separator
  1391. ----
  1392. .. _class_PhysicsServer_method_joint_create_generic_6dof:
  1393. .. rst-class:: classref-method
  1394. :ref:`RID<class_RID>` **joint_create_generic_6dof** **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` local_ref_B **)**
  1395. Creates a :ref:`Generic6DOFJoint<class_Generic6DOFJoint>`.
  1396. .. rst-class:: classref-item-separator
  1397. ----
  1398. .. _class_PhysicsServer_method_joint_create_hinge:
  1399. .. rst-class:: classref-method
  1400. :ref:`RID<class_RID>` **joint_create_hinge** **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` hinge_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` hinge_B **)**
  1401. Creates a :ref:`HingeJoint<class_HingeJoint>`.
  1402. .. rst-class:: classref-item-separator
  1403. ----
  1404. .. _class_PhysicsServer_method_joint_create_pin:
  1405. .. rst-class:: classref-method
  1406. :ref:`RID<class_RID>` **joint_create_pin** **(** :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` local_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` local_B **)**
  1407. Creates a :ref:`PinJoint<class_PinJoint>`.
  1408. .. rst-class:: classref-item-separator
  1409. ----
  1410. .. _class_PhysicsServer_method_joint_create_slider:
  1411. .. rst-class:: classref-method
  1412. :ref:`RID<class_RID>` **joint_create_slider** **(** :ref:`RID<class_RID>` body_A, :ref:`Transform<class_Transform>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform<class_Transform>` local_ref_B **)**
  1413. Creates a :ref:`SliderJoint<class_SliderJoint>`.
  1414. .. rst-class:: classref-item-separator
  1415. ----
  1416. .. _class_PhysicsServer_method_joint_get_solver_priority:
  1417. .. rst-class:: classref-method
  1418. :ref:`int<class_int>` **joint_get_solver_priority** **(** :ref:`RID<class_RID>` joint **)** |const|
  1419. Gets the priority value of the Joint.
  1420. .. rst-class:: classref-item-separator
  1421. ----
  1422. .. _class_PhysicsServer_method_joint_get_type:
  1423. .. rst-class:: classref-method
  1424. :ref:`JointType<enum_PhysicsServer_JointType>` **joint_get_type** **(** :ref:`RID<class_RID>` joint **)** |const|
  1425. Returns the type of the Joint.
  1426. .. rst-class:: classref-item-separator
  1427. ----
  1428. .. _class_PhysicsServer_method_joint_set_solver_priority:
  1429. .. rst-class:: classref-method
  1430. void **joint_set_solver_priority** **(** :ref:`RID<class_RID>` joint, :ref:`int<class_int>` priority **)**
  1431. Sets the priority value of the Joint.
  1432. .. rst-class:: classref-item-separator
  1433. ----
  1434. .. _class_PhysicsServer_method_pin_joint_get_local_a:
  1435. .. rst-class:: classref-method
  1436. :ref:`Vector3<class_Vector3>` **pin_joint_get_local_a** **(** :ref:`RID<class_RID>` joint **)** |const|
  1437. Returns position of the joint in the local space of body a of the joint.
  1438. .. rst-class:: classref-item-separator
  1439. ----
  1440. .. _class_PhysicsServer_method_pin_joint_get_local_b:
  1441. .. rst-class:: classref-method
  1442. :ref:`Vector3<class_Vector3>` **pin_joint_get_local_b** **(** :ref:`RID<class_RID>` joint **)** |const|
  1443. Returns position of the joint in the local space of body b of the joint.
  1444. .. rst-class:: classref-item-separator
  1445. ----
  1446. .. _class_PhysicsServer_method_pin_joint_get_param:
  1447. .. rst-class:: classref-method
  1448. :ref:`float<class_float>` **pin_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` param **)** |const|
  1449. Gets a pin_joint parameter (see :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` constants).
  1450. .. rst-class:: classref-item-separator
  1451. ----
  1452. .. _class_PhysicsServer_method_pin_joint_set_local_a:
  1453. .. rst-class:: classref-method
  1454. void **pin_joint_set_local_a** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_A **)**
  1455. Sets position of the joint in the local space of body a of the joint.
  1456. .. rst-class:: classref-item-separator
  1457. ----
  1458. .. _class_PhysicsServer_method_pin_joint_set_local_b:
  1459. .. rst-class:: classref-method
  1460. void **pin_joint_set_local_b** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_B **)**
  1461. Sets position of the joint in the local space of body b of the joint.
  1462. .. rst-class:: classref-item-separator
  1463. ----
  1464. .. _class_PhysicsServer_method_pin_joint_set_param:
  1465. .. rst-class:: classref-method
  1466. void **pin_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` param, :ref:`float<class_float>` value **)**
  1467. Sets a pin_joint parameter (see :ref:`PinJointParam<enum_PhysicsServer_PinJointParam>` constants).
  1468. .. rst-class:: classref-item-separator
  1469. ----
  1470. .. _class_PhysicsServer_method_set_active:
  1471. .. rst-class:: classref-method
  1472. void **set_active** **(** :ref:`bool<class_bool>` active **)**
  1473. Activates or deactivates the 3D physics engine.
  1474. .. rst-class:: classref-item-separator
  1475. ----
  1476. .. _class_PhysicsServer_method_set_collision_iterations:
  1477. .. rst-class:: classref-method
  1478. void **set_collision_iterations** **(** :ref:`int<class_int>` iterations **)**
  1479. Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is ``8``.
  1480. \ **Note:** Only has an effect when using the GodotPhysics engine, not the default Bullet physics engine.
  1481. .. rst-class:: classref-item-separator
  1482. ----
  1483. .. _class_PhysicsServer_method_shape_create:
  1484. .. rst-class:: classref-method
  1485. :ref:`RID<class_RID>` **shape_create** **(** :ref:`ShapeType<enum_PhysicsServer_ShapeType>` type **)**
  1486. Creates a shape of a type from :ref:`ShapeType<enum_PhysicsServer_ShapeType>`. Does not assign it to a body or an area. To do so, you must use :ref:`area_set_shape<class_PhysicsServer_method_area_set_shape>` or :ref:`body_set_shape<class_PhysicsServer_method_body_set_shape>`.
  1487. .. rst-class:: classref-item-separator
  1488. ----
  1489. .. _class_PhysicsServer_method_shape_get_data:
  1490. .. rst-class:: classref-method
  1491. :ref:`Variant<class_Variant>` **shape_get_data** **(** :ref:`RID<class_RID>` shape **)** |const|
  1492. Returns the shape data.
  1493. .. rst-class:: classref-item-separator
  1494. ----
  1495. .. _class_PhysicsServer_method_shape_get_type:
  1496. .. rst-class:: classref-method
  1497. :ref:`ShapeType<enum_PhysicsServer_ShapeType>` **shape_get_type** **(** :ref:`RID<class_RID>` shape **)** |const|
  1498. Returns the type of shape (see :ref:`ShapeType<enum_PhysicsServer_ShapeType>` constants).
  1499. .. rst-class:: classref-item-separator
  1500. ----
  1501. .. _class_PhysicsServer_method_shape_set_data:
  1502. .. rst-class:: classref-method
  1503. void **shape_set_data** **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)**
  1504. Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type<class_PhysicsServer_method_shape_get_type>`.
  1505. .. rst-class:: classref-item-separator
  1506. ----
  1507. .. _class_PhysicsServer_method_slider_joint_get_param:
  1508. .. rst-class:: classref-method
  1509. :ref:`float<class_float>` **slider_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` param **)** |const|
  1510. Gets a slider_joint parameter (see :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` constants).
  1511. .. rst-class:: classref-item-separator
  1512. ----
  1513. .. _class_PhysicsServer_method_slider_joint_set_param:
  1514. .. rst-class:: classref-method
  1515. void **slider_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` param, :ref:`float<class_float>` value **)**
  1516. Gets a slider_joint parameter (see :ref:`SliderJointParam<enum_PhysicsServer_SliderJointParam>` constants).
  1517. .. rst-class:: classref-item-separator
  1518. ----
  1519. .. _class_PhysicsServer_method_space_create:
  1520. .. rst-class:: classref-method
  1521. :ref:`RID<class_RID>` **space_create** **(** **)**
  1522. Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with :ref:`area_set_space<class_PhysicsServer_method_area_set_space>`, or to a body with :ref:`body_set_space<class_PhysicsServer_method_body_set_space>`.
  1523. .. rst-class:: classref-item-separator
  1524. ----
  1525. .. _class_PhysicsServer_method_space_get_direct_state:
  1526. .. rst-class:: classref-method
  1527. :ref:`PhysicsDirectSpaceState<class_PhysicsDirectSpaceState>` **space_get_direct_state** **(** :ref:`RID<class_RID>` space **)**
  1528. Returns the state of a space, a :ref:`PhysicsDirectSpaceState<class_PhysicsDirectSpaceState>`. This object can be used to make collision/intersection queries.
  1529. .. rst-class:: classref-item-separator
  1530. ----
  1531. .. _class_PhysicsServer_method_space_get_param:
  1532. .. rst-class:: classref-method
  1533. :ref:`float<class_float>` **space_get_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` param **)** |const|
  1534. Returns the value of a space parameter.
  1535. .. rst-class:: classref-item-separator
  1536. ----
  1537. .. _class_PhysicsServer_method_space_is_active:
  1538. .. rst-class:: classref-method
  1539. :ref:`bool<class_bool>` **space_is_active** **(** :ref:`RID<class_RID>` space **)** |const|
  1540. Returns whether the space is active.
  1541. .. rst-class:: classref-item-separator
  1542. ----
  1543. .. _class_PhysicsServer_method_space_set_active:
  1544. .. rst-class:: classref-method
  1545. void **space_set_active** **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)**
  1546. Marks a space as active. It will not have an effect, unless it is assigned to an area or body.
  1547. .. rst-class:: classref-item-separator
  1548. ----
  1549. .. _class_PhysicsServer_method_space_set_param:
  1550. .. rst-class:: classref-method
  1551. void **space_set_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` param, :ref:`float<class_float>` value **)**
  1552. Sets the value for a space parameter. A list of available parameters is on the :ref:`SpaceParameter<enum_PhysicsServer_SpaceParameter>` constants.
  1553. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1554. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1555. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1556. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`