Skip to content

Commit 402c211

Browse files
authored
Switch demos and docs to 2.3.0 (#136)
1 parent e6a14f6 commit 402c211

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

docs/docs/01_quickstart/00-project-setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Next, create a new console application in this directory and add Raylib-cs and J
2727
```sh
2828
dotnet new console
2929
dotnet add package Raylib-cs --version 5.0.0
30-
dotnet add package Jitter2 --version 2.2.1
30+
dotnet add package Jitter2 --version 2.3.0
3131
```
3232

3333
You have completed the setup. If you now execute the following command:

docs/docs/01_quickstart/02-hello-world.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We will now add physics to the scene. We do this by creating a new instance of t
88

99
Replace the content of `Program.cs` with the following code (marked lines indicate the additions to the source code):
1010

11-
```cs Program.cs {3-6,9-18,28,41-62,87-93} showLineNumbers
11+
```cs Program.cs {3-6,9-18,28,41-63,88-94} showLineNumbers
1212
using System.Numerics;
1313
using Raylib_cs;
1414
using Jitter2;
@@ -19,7 +19,7 @@ using static Raylib_cs.Raylib;
1919

2020
static Matrix4x4 GetRayLibTransformMatrix(RigidBody body)
2121
{
22-
JMatrix ori = body.Orientation;
22+
JMatrix ori = JMatrix.CreateFromQuaternion(body.Orientation);
2323
JVector pos = body.Position;
2424

2525
return new Matrix4x4(ori.M11, ori.M12, ori.M13, pos.X,
@@ -57,6 +57,7 @@ SetMaterialTexture(ref boxMat, MaterialMapIndex.MATERIAL_MAP_DIFFUSE, texture);
5757

5858
// initialize the Jitter physics world
5959
World world = new ();
60+
world.NumberSubsteps = 4;
6061

6162
// add a body representing the plane
6263
RigidBody planeBody = world.CreateRigidBody();

other/GodotDemo/JitterGodot.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<EnableDynamicLoading>true</EnableDynamicLoading>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Jitter2" Version="2.2.1" />
7+
<PackageReference Include="Jitter2" Version="2.3.0" />
88
</ItemGroup>
9-
</Project>
9+
</Project>

other/GodotDemo/Program.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ public override void _Process(double delta)
4040

4141
for (int i = 0; i < cubes.Count; i++)
4242
{
43-
ref JMatrix mat = ref cubes[i].Data.Orientation;
44-
ref JVector pos = ref cubes[i].Data.Position;
43+
JMatrix mat = JMatrix.CreateFromQuaternion(cubes[i].Data.Orientation);
44+
JVector pos = cubes[i].Data.Position;
4545

4646
Transform3D trans = Transform3D.Identity;
47+
4748
trans[0] = Conversion.FromJitter(mat.GetColumn(0));
4849
trans[1] = Conversion.FromJitter(mat.GetColumn(1));
4950
trans[2] = Conversion.FromJitter(mat.GetColumn(2));

other/GodotSoftBodies/JitterGodot.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<EnableDynamicLoading>true</EnableDynamicLoading>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Jitter2" Version="2.2.1" />
7+
<PackageReference Include="Jitter2" Version="2.3.0" />
88
</ItemGroup>
9-
</Project>
9+
</Project>

0 commit comments

Comments
 (0)