User:CrosRoad95: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
List of functions i'm working on:
{{Client function}}
Creates physics world with default settings.


==Syntax==
{{Client_physics_functions}}
<syntaxhighlight lang="lua">
physics physicsCreateWorld( float gravityX= 0, float gravityY= 0, float gravityZ = -9.81)           
</syntaxhighlight>
 
===Required Arguments===
*'''gravity:''' gravitation used for simulation.
 
===Returns===
*'''physics''' world used for simulation.


==Example==
Future ideas for physics:
 
# gear constraint
<syntaxhighlight lang="lua">
# wheels
physics = physicsCreateWorld()
# detailed raycast
</syntaxhighlight>
# copying shape
 
# respawn point for rigid body, if will not activated for some time, got moved to respawn point
==See Also==
# attaching rigid body to mta object
 
# multimaterial triangle mesh
{{Client_physics_functions}}
# options to build gta collision function:
## - what models should be created as rigid body, do they should have set respawn point?
## - reuse shapes, create new for duplicated models
## - don't create compound shape if not needed
# soft bodies
# drawing debug only for specified rigid body/static collision/shape
# debug mode to render only rigids, only static collision or both
# fast 3d line
# profiling
# quering physics element
# world size option to automatic get rid of rigid bodies which fall off world
# creating static or rigids collisions from objects created by createObject
# add rest of properties for everything
# improve current functions
## triangle mesh should accept `verteX, vertex, vertex, verteX, vertex, vertex` or {verteX, vertex, vertex, verteX, vertex, vertex,} or {{verteX, vertex, vertex}, {verteX, vertex, vertex}}
# multithreading physics simulation
# add missing shapes: btBox2dShape, btConvex2dShape, btEmptyShape, btGImpactCompoundShape, btGImpactMeshShape, btMinkowskiSumShape, CbtMultiSphereShape, CbtMultimaterialTriangleMeshShape, btPlaneShape, CbtScaledBvhTriangleMeshShape,
##

Latest revision as of 06:40, 20 February 2020

List of functions i'm working on:

Future ideas for physics:

  1. gear constraint
  2. wheels
  3. detailed raycast
  4. copying shape
  5. respawn point for rigid body, if will not activated for some time, got moved to respawn point
  6. attaching rigid body to mta object
  7. multimaterial triangle mesh
  8. options to build gta collision function:
    1. - what models should be created as rigid body, do they should have set respawn point?
    2. - reuse shapes, create new for duplicated models
    3. - don't create compound shape if not needed
  9. soft bodies
  10. drawing debug only for specified rigid body/static collision/shape
  11. debug mode to render only rigids, only static collision or both
  12. fast 3d line
  13. profiling
  14. quering physics element
  15. world size option to automatic get rid of rigid bodies which fall off world
  16. creating static or rigids collisions from objects created by createObject
  17. add rest of properties for everything
  18. improve current functions
    1. triangle mesh should accept `verteX, vertex, vertex, verteX, vertex, vertex` or {verteX, vertex, vertex, verteX, vertex, vertex,} or {{verteX, vertex, vertex}, {verteX, vertex, vertex}}
  19. multithreading physics simulation
  20. add missing shapes: btBox2dShape, btConvex2dShape, btEmptyShape, btGImpactCompoundShape, btGImpactMeshShape, btMinkowskiSumShape, CbtMultiSphereShape, CbtMultimaterialTriangleMeshShape, btPlaneShape, CbtScaledBvhTriangleMeshShape,