polish list
This commit is contained in:
parent
c5b7a146a8
commit
893c10904a
1 changed files with 8 additions and 7 deletions
|
@ -1,10 +1,11 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
// [X] stretch cursor move
|
// [X] stretch cursor move
|
||||||
// [ ] points (point of reference *all around)
|
// [ ] points *arbitrary for now
|
||||||
// [ ] trackballer spin
|
// [ ] follow player *cam? matrix? name?
|
||||||
// [ ] orbital view
|
// [ ] orbital view
|
||||||
// [ ] dummy enemies
|
// [ ] dummy enemies
|
||||||
|
// [ ] trackballer spin
|
||||||
// [ ] roll dodge move
|
// [ ] roll dodge move
|
||||||
|
|
||||||
namespace Space;
|
namespace Space;
|
||||||
|
@ -32,7 +33,7 @@ public class Mono {
|
||||||
Rig rig = Oriels.Mono.inst.rig;
|
Rig rig = Oriels.Mono.inst.rig;
|
||||||
Oriel oriel = Oriels.Mono.inst.oriel;
|
Oriel oriel = Oriels.Mono.inst.oriel;
|
||||||
|
|
||||||
Matrix orielSimMatrix = Matrix.TRS(
|
Matrix simMatrix = Matrix.TRS(
|
||||||
new Vec3(0, 0, 0), //-oriel.bounds.dimensions.y / 2.01f, -playerWorldPos.z),
|
new Vec3(0, 0, 0), //-oriel.bounds.dimensions.y / 2.01f, -playerWorldPos.z),
|
||||||
Quat.Identity,
|
Quat.Identity,
|
||||||
Vec3.One * 0.5f * oriel.bounds.dimensions.y
|
Vec3.One * 0.5f * oriel.bounds.dimensions.y
|
||||||
|
@ -49,7 +50,7 @@ public class Mono {
|
||||||
float stretch = Vec3.Distance(rig.lCon.pos, rig.rCon.pos);
|
float stretch = Vec3.Distance(rig.lCon.pos, rig.rCon.pos);
|
||||||
stretch = Math.Max(stretch - deadzone, 0);
|
stretch = Math.Max(stretch - deadzone, 0);
|
||||||
Vec3 cursor = rig.rCon.pos + rig.rCon.ori * Vec3.Forward * stretch * 3;
|
Vec3 cursor = rig.rCon.pos + rig.rCon.ori * Vec3.Forward * stretch * 3;
|
||||||
Vec3 localCursor = orielSimMatrix.Inverse.Transform(oriel.matrix.Transform(cursor));
|
Vec3 localCursor = simMatrix.Inverse.Transform(oriel.matrix.Transform(cursor));
|
||||||
|
|
||||||
// fly player towards cursor:
|
// fly player towards cursor:
|
||||||
// playerPos += (localCursor - playerPos).Normalized * 1f * Time.Elapsedf;
|
// playerPos += (localCursor - playerPos).Normalized * 1f * Time.Elapsedf;
|
||||||
|
@ -71,7 +72,7 @@ public class Mono {
|
||||||
new Color(1f, 1f, 1f)
|
new Color(1f, 1f, 1f)
|
||||||
);
|
);
|
||||||
meshCube.Draw(oriel.matOriel,
|
meshCube.Draw(oriel.matOriel,
|
||||||
Matrix.TRS(localCursor, Quat.Identity, Vec3.One * 0.02f) * orielSimMatrix * oriel.matrix.Inverse,
|
Matrix.TRS(localCursor, Quat.Identity, Vec3.One * 0.02f) * simMatrix * oriel.matrix.Inverse,
|
||||||
new Color(0f, 0f, 0f)
|
new Color(0f, 0f, 0f)
|
||||||
);
|
);
|
||||||
meshCube.Draw(oriel.matOriel,
|
meshCube.Draw(oriel.matOriel,
|
||||||
|
@ -79,7 +80,7 @@ public class Mono {
|
||||||
playerPos,
|
playerPos,
|
||||||
Quat.LookDir((localCursor - playerPos).Normalized),
|
Quat.LookDir((localCursor - playerPos).Normalized),
|
||||||
new Vec3(0.4f, 0.2f, 0.4f)
|
new Vec3(0.4f, 0.2f, 0.4f)
|
||||||
) * orielSimMatrix * oriel.matrix.Inverse,
|
) * simMatrix * oriel.matrix.Inverse,
|
||||||
new Color(1.0f, 0.0f, 0.05f)
|
new Color(1.0f, 0.0f, 0.05f)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -142,7 +143,7 @@ public class Mono {
|
||||||
Matrix.TRS(enemies[i],
|
Matrix.TRS(enemies[i],
|
||||||
Quat.LookAt(enemies[i], playerPos, Vec3.Up),
|
Quat.LookAt(enemies[i], playerPos, Vec3.Up),
|
||||||
new Vec3(0.4f, 1f, 0.2f)
|
new Vec3(0.4f, 1f, 0.2f)
|
||||||
) * orielSimMatrix * oriel.matrix.Inverse,
|
) * simMatrix * oriel.matrix.Inverse,
|
||||||
Color.White * 0.62f
|
Color.White * 0.62f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue