ready for first dof network test
This commit is contained in:
parent
231c5c398e
commit
5e6f555bb3
3 changed files with 29 additions and 22 deletions
20
Program.cs
20
Program.cs
|
@ -41,19 +41,17 @@ public static class Mono {
|
||||||
// Console.WriteLine("Your IP is: " + publicIP);
|
// Console.WriteLine("Your IP is: " + publicIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
Peer peer0 = new Peer("peer0");
|
Peer peer = new Peer("ego");
|
||||||
Peer peer1 = new Peer("peer1");
|
|
||||||
peer0.Start(false);
|
|
||||||
peer1.Start(false);
|
|
||||||
|
|
||||||
ColorCube cube = new ColorCube();
|
ColorCube cube = new ColorCube();
|
||||||
OrbitalView.strength = 4;
|
OrbitalView.strength = 4;
|
||||||
OrbitalView.distance = 0.4f;
|
OrbitalView.distance = 0.4f;
|
||||||
cube.thickness = 0.01f;
|
cube.thickness = 0.01f;
|
||||||
|
|
||||||
ReachCursor reachCursor = new ReachCursor();
|
StretchCursor stretchCursor = new StretchCursor();
|
||||||
SupineCursor supineCursor = new SupineCursor();
|
// ReachCursor reachCursor = new ReachCursor();
|
||||||
ClawCursor clawCursor = new ClawCursor();
|
// SupineCursor supineCursor = new SupineCursor();
|
||||||
|
// ClawCursor clawCursor = new ClawCursor();
|
||||||
|
|
||||||
Oriel oriel = new Oriel();
|
Oriel oriel = new Oriel();
|
||||||
|
|
||||||
|
@ -65,11 +63,9 @@ public static class Mono {
|
||||||
offHand = Input.Controller(Handed.Left);
|
offHand = Input.Controller(Handed.Left);
|
||||||
mainHand = Input.Controller(Handed.Right);
|
mainHand = Input.Controller(Handed.Right);
|
||||||
|
|
||||||
peer0.cursor = offHand.aim.position * new Vec3(1,1,-1);
|
stretchCursor.Step(offHand.aim, mainHand.aim);
|
||||||
peer1.cursor = mainHand.aim.position * new Vec3(1,1,-1);
|
peer.cursor = stretchCursor.pos;
|
||||||
|
model.Draw(Matrix.TS(peer.peerCursor, 0.1f));
|
||||||
model.Draw(Matrix.TS(peer0.peerCursor, 0.1f));
|
|
||||||
model.Draw(Matrix.TS(peer1.peerCursor, 0.1f));
|
|
||||||
|
|
||||||
// if (offHand.trigger.) {
|
// if (offHand.trigger.) {
|
||||||
// lerper.t = 0;
|
// lerper.t = 0;
|
||||||
|
|
21
README.md
21
README.md
|
@ -14,18 +14,19 @@
|
||||||
|
|
||||||
## increment
|
## increment
|
||||||
- ~~merge networking prototypes~~
|
- ~~merge networking prototypes~~
|
||||||
|
- fixed latency, now for multiple clients
|
||||||
- architect interfaces for navigation
|
- architect interfaces for navigation
|
||||||
- implement all dofs from site
|
- implement all dofs from site
|
||||||
|
|
||||||
## stream
|
## stream
|
||||||
- ~~refactor cursors to pose data 30m~~
|
|
||||||
- ~~claw cursor 30m~~
|
|
||||||
- ~~refactor networking code to async based on video 1hr~~
|
|
||||||
- ~~haul the networking into stereokit 30m~~
|
|
||||||
- ~~do something spatial with the data 48m~~
|
|
||||||
|
|
||||||
- why is the latency 20s? (client side?) // though the server needs a refactor pass *send then receive*
|
|
||||||
- make a batch script for niko so he can test things easily 32m (+script that does the "install")
|
|
||||||
|
|
||||||
- dead simple press to step through dofs
|
- dead simple press to step through dofs
|
||||||
- gif maker
|
- gif maker
|
||||||
|
|
||||||
|
## override
|
||||||
|
15 days left for the sterokit comp
|
||||||
|
|
||||||
|
1/3 mvp:
|
||||||
|
|
||||||
|
2/3 polish:
|
||||||
|
|
||||||
|
3/3 accessibility:
|
|
@ -9,6 +9,16 @@ public abstract class SpatialCursor {
|
||||||
public static Model model = Model.FromFile("cursor.glb", Shader.Default);
|
public static Model model = Model.FromFile("cursor.glb", Shader.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class StretchCursor : SpatialCursor {
|
||||||
|
public void Step(Pose offPose, Pose mainPose) {
|
||||||
|
float stretch = (offPose.position - mainPose.position).Magnitude;
|
||||||
|
stretch = Math.Max(stretch - 0.1f, 0);
|
||||||
|
pos = mainPose.position + mainPose.Forward * stretch * 3;
|
||||||
|
|
||||||
|
model.Draw(Matrix.TS(pos, 0.06f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// this is just a stretch cursor derivative
|
// this is just a stretch cursor derivative
|
||||||
public class ReachCursor : SpatialCursor {
|
public class ReachCursor : SpatialCursor {
|
||||||
static Vec3 origin;
|
static Vec3 origin;
|
||||||
|
|
Loading…
Add table
Reference in a new issue