One-way angle in Colliders, Physics, Tiles and Tilemaps, Development: check total 1075 (#159)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent
cb0c46c5ea
commit
a61c7a8a69
5 files changed
+20
-9
No files matched your search
+10
-4
@@ -81,11 +81,17 @@ block it. `Move` without the setting and `Set position` ignore colliders entirel
|
|||||||
|
|
||||||
A collider with **One-way** on (#155) blocks only what comes from one side: **Blocks from** says
|
A collider with **One-way** on (#155) blocks only what comes from one side: **Blocks from** says
|
||||||
which — *Above* by default, or *Below*, *Left*, *Right* — in the collider's own axes, so it turns
|
which — *Above* by default, or *Below*, *Left*, *Right* — in the collider's own axes, so it turns
|
||||||
and mirrors with its object. In the scene view that side is drawn thick. It is the platform a
|
and mirrors with its object. In the scene view that side is drawn thick, with a fan on its middle
|
||||||
figure jumps through from below and lands on from above:
|
showing the **One-way angle**. It is the platform a figure jumps through from below and lands on
|
||||||
|
from above:
|
||||||
|
|
||||||
- It blocks a contact whose normal lies within **45 degrees** of that side; anything else passes -
|
- It blocks a contact whose normal lies within the **One-way angle** of that side — **45 degrees**
|
||||||
from below, and from the side as well, as in Unity and Godot.
|
by default, 0 to 90 (#159); anything else passes - from below, and from the side as well, as in
|
||||||
|
Unity and Godot. The angle counts where the surface is not square to that side: on a slope of
|
||||||
|
25 degrees in a polygon blocking from *Above*, a figure lands at 25 degrees or more and falls
|
||||||
|
through below that. At 90 degrees the sides block too, only what comes from the opposite side
|
||||||
|
passes.
|
||||||
|
- *Blocks from* and *One-way angle* show in the inspector only while *One-way* is on.
|
||||||
- What is already inside it passes on through for as long as it is inside, so a jump that did not
|
- What is already inside it passes on through for as long as it is inside, so a jump that did not
|
||||||
clear the top falls back out below.
|
clear the top falls back out below.
|
||||||
- `Move` with *Collide with solids* reports `hit` only where it was stopped, and a fast fall is
|
- `Move` with *Collide with solids* reports `hit` only where it was stopped, and a fast fall is
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ npm run check # typecheck + lint + format:check + tests, the gate CI runs
|
|||||||
# code is lost (tail's is reported), so a red run reads as green
|
# code is lost (tail's is reported), so a red run reads as green
|
||||||
npm run build # writes dist/ and regenerates index.html
|
npm run build # writes dist/ and regenerates index.html
|
||||||
./build.sh # the same under `set -o pipefail`, for callers that pipe the output
|
./build.sh # the same under `set -o pipefail`, for callers that pipe the output
|
||||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1074 editor checks, screenshots in /tmp/gm-e2e-*.png
|
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1075 editor checks, screenshots in /tmp/gm-e2e-*.png
|
||||||
GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step
|
GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step
|
||||||
./e2e.sh start [GM_STEPS] # the same run detached, see below
|
./e2e.sh start [GM_STEPS] # the same run detached, see below
|
||||||
./e2e.sh status # live progress, or the last run's result
|
./e2e.sh status # live progress, or the last run's result
|
||||||
|
|||||||
+2
-1
@@ -108,7 +108,8 @@ one-way collider is worked out **before every step**:
|
|||||||
|
|
||||||
- It **lands** when it is on the blocking side or sunk in no deeper than 2 units (a landing at 60
|
- It **lands** when it is on the blocking side or sunk in no deeper than 2 units (a landing at 60
|
||||||
steps per second sinks in 1.9 before the engine pushes it out), the contact faces that side
|
steps per second sinks in 1.9 before the engine pushes it out), the contact faces that side
|
||||||
within 45 degrees, and it is not moving away from it.
|
within the collider's or tile's one-way angle (45 degrees by default, #159), and it is not moving
|
||||||
|
away from it.
|
||||||
- Once landed it is **held** as long as the two overlap: a body falling 2000 units per second is
|
- Once landed it is **held** as long as the two overlap: a body falling 2000 units per second is
|
||||||
13 units into an 8 units thick platform one step later, and is pushed back up instead of passing.
|
13 units into an 8 units thick platform one step later, and is pushed back up instead of passing.
|
||||||
- Otherwise it passes, and so does a body told to by `Ignore one-way`. A resting body is woken for
|
- Otherwise it passes, and so does a body told to by `Ignore one-way`. A resting body is woken for
|
||||||
|
|||||||
+5
-3
@@ -210,9 +210,11 @@ There are no trigger tiles yet: a tile blocks or it does not.
|
|||||||
A solid tile with **One-way (from above)** on (#155) blocks only what comes down on it from above,
|
A solid tile with **One-way (from above)** on (#155) blocks only what comes down on it from above,
|
||||||
like a one-way collider blocking from *Above* (see [Colliders](Colliders#one-way)): a figure jumps
|
like a one-way collider blocking from *Above* (see [Colliders](Colliders#one-way)): a figure jumps
|
||||||
through from below and from the side, lands on top, and falls through with `Ignore one-way`. Above
|
through from below and from the side, lands on top, and falls through with `Ignore one-way`. Above
|
||||||
means the map's top, turned with it. One-way cells are merged into rectangles the same way, but only
|
means the map's top, turned with it. The tile's **One-way angle** (45 degrees by default, #159) is
|
||||||
with each other — a platform next to a wall is two shapes, so the wall never blocks from below only.
|
how far a contact may lean from straight up and still land, as on a collider. One-way cells are
|
||||||
In the scene view they are outlined thinner, their top drawn thick.
|
merged into rectangles the same way, but only with each other and only with tiles of the same angle —
|
||||||
|
a platform next to a wall is two shapes, so the wall never blocks from below only. In the scene view
|
||||||
|
they are outlined thinner, their top drawn thick with the fan of their angle on its middle.
|
||||||
|
|
||||||
## In the project file
|
## In the project file
|
||||||
|
|
||||||
|
|||||||
+2
@@ -62,6 +62,8 @@ asks for; a picture that does not fit is kept and named, never silently dropped.
|
|||||||
every layer (#132); see [Tilemaps](Tilemaps#collision).
|
every layer (#132); see [Tilemaps](Tilemaps#collision).
|
||||||
- **One-way (from above)** — off by default. A solid tile with it on blocks only from above: a
|
- **One-way (from above)** — off by default. A solid tile with it on blocks only from above: a
|
||||||
platform one jumps through from below (#155); see [Tilemaps](Tilemaps#one-way-tiles).
|
platform one jumps through from below (#155); see [Tilemaps](Tilemaps#one-way-tiles).
|
||||||
|
- **One-way angle** — 45 by default, 0 to 90, shown while *One-way* is on. How far a contact may
|
||||||
|
lean from straight up and still land on the tile (#159).
|
||||||
- **Collision scale** — 1 by default. How big a solid cell blocks against its square, drawn in or
|
- **Collision scale** — 1 by default. How big a solid cell blocks against its square, drawn in or
|
||||||
out only on the sides without a blocking neighbour (#140); see
|
out only on the sides without a blocking neighbour (#140); see
|
||||||
[Tilemaps](Tilemaps#collision-scale).
|
[Tilemaps](Tilemaps#collision-scale).
|
||||||
|
|||||||
Reference in new issue
Block a user