godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.7k stars 3.03k forks source link

Lack of documentation on shape-casting & low-level physics interaction #5159

Open azur-wolf opened 3 years ago

azur-wolf commented 3 years ago

Your Godot version: 3.3.2

Issue description: No documentation of shape-casting and other low-level physics interaction.

There isn't in the whole internet any kind of material (docs, tutorials, etc) about shape-casting (PhysicsDirectSpaceState 2D/3D). In fact it means that it is unknown by the bast majority of the users. The few that can found is 2D, and too limited.

So how newcomers will implement cool things like stair-stepping, edge-friction, complex movement engagement (ie TombRaider-like climbing), non-rudimentary navigation along walls and ceilings (ie creature climb), and AI spatial queries, etc.

Its true that advanced users can dig into it and get things working, but for most of the novel game-developers and/or programmers, it can become a roadblock (as recently talking with a couple).

Currently all stuff involving it:

To favor that more virtuous games get shipped, good material about would be determinant, addressing typical uses, typical doubts, mistakes and misunderstands, and a general overview to dig onto it.

Giving the tools for do advanced stuff will lead for more advanced stuff coming out.

Xrayez commented 3 years ago

Alternatively, see godotengine/godot-proposals#710.

Flavelius commented 2 years ago

There are also pretty confusing errors in the API that must be documented (maybe it's only in c#/godot mono though). For example collider_id from some of those queries is an integer, but regular object ids are of type ulong, this requires double casting before it works without erroring out. Or in PhysicsShapeQueryParameters where the collisionMask is of type int but regular layer mask properties are of type uint. Or that its Exclude Array returns a copy, not a reference (meaning you can't do myQuery.Exclude.Add(), but have to store the array in a temporary variable and assign it back)

Edit: collisionMask uint/int seems to have been addressed in 3.4.beta6