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);
|
||||
}
|
||||
|
||||
Peer peer0 = new Peer("peer0");
|
||||
Peer peer1 = new Peer("peer1");
|
||||
peer0.Start(false);
|
||||
peer1.Start(false);
|
||||
Peer peer = new Peer("ego");
|
||||
|
||||
ColorCube cube = new ColorCube();
|
||||
OrbitalView.strength = 4;
|
||||
OrbitalView.distance = 0.4f;
|
||||
cube.thickness = 0.01f;
|
||||
|
||||
ReachCursor reachCursor = new ReachCursor();
|
||||
SupineCursor supineCursor = new SupineCursor();
|
||||
ClawCursor clawCursor = new ClawCursor();
|
||||
StretchCursor stretchCursor = new StretchCursor();
|
||||
// ReachCursor reachCursor = new ReachCursor();
|
||||
// SupineCursor supineCursor = new SupineCursor();
|
||||
// ClawCursor clawCursor = new ClawCursor();
|
||||
|
||||
Oriel oriel = new Oriel();
|
||||
|
||||
|
@ -65,11 +63,9 @@ public static class Mono {
|
|||
offHand = Input.Controller(Handed.Left);
|
||||
mainHand = Input.Controller(Handed.Right);
|
||||
|
||||
peer0.cursor = offHand.aim.position * new Vec3(1,1,-1);
|
||||
peer1.cursor = mainHand.aim.position * new Vec3(1,1,-1);
|
||||
|
||||
model.Draw(Matrix.TS(peer0.peerCursor, 0.1f));
|
||||
model.Draw(Matrix.TS(peer1.peerCursor, 0.1f));
|
||||
stretchCursor.Step(offHand.aim, mainHand.aim);
|
||||
peer.cursor = stretchCursor.pos;
|
||||
model.Draw(Matrix.TS(peer.peerCursor, 0.1f));
|
||||
|
||||
// if (offHand.trigger.) {
|
||||
// lerper.t = 0;
|
||||
|
|
21
README.md
21
README.md
|
@ -14,18 +14,19 @@
|
|||
|
||||
## increment
|
||||
- ~~merge networking prototypes~~
|
||||
- fixed latency, now for multiple clients
|
||||
- architect interfaces for navigation
|
||||
- implement all dofs from site
|
||||
|
||||
## 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
|
||||
- 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 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
|
||||
public class ReachCursor : SpatialCursor {
|
||||
static Vec3 origin;
|
||||
|
|
Loading…
Add table
Reference in a new issue