Cleanup anchor related code.

This commit is contained in:
2023-01-01 19:01:34 +08:00
parent e8f74399f2
commit 4d7773a2ac
3 changed files with 21 additions and 35 deletions

View File

@@ -39,6 +39,7 @@ namespace Cryville.Crtr {
#endif
}
else if (s.CloneType == 3) {
spos = Vector3.zero;
bpos = cpt;
brot = Quaternion.Euler(s.Direction);
}
@@ -61,18 +62,7 @@ namespace Cryville.Crtr {
public override void Update(ContainerState s, StampedEvent ev) {
base.Update(s, ev);
if (s.CloneType == 0) {
pwp = Vector3.zero;
cpt = s.ScreenPoint;
spos = Vector3.zero;
#if UNITY_5_6_OR_NEWER
a_cur.SetPositionAndRotation(s.ScreenPoint, Quaternion.Euler(s.Direction));
#else
a_cur.position = s.ScreenPoint;
a_cur.rotation = Quaternion.Euler(s.Direction);
#endif
}
else if (s.CloneType == 2 || s.CloneType == 3) {
if (s.CloneType == 2 || s.CloneType == 3) {
var tpt = s.ScreenPoint;
var tsv = s.ScrollVelocity;