คำถามติดแท็ก vrpn

5
ทำไมฉันไม่สามารถใช้โอเปอเรเตอร์ '> =' กับ Vector3s ได้
ฉันพยายามที่จะได้รับรูปสี่เหลี่ยมผืนผ้าย้ายไปมาระหว่างสองตำแหน่งที่ผมพูดถึงและ_positionA ทั้งสองประเภท_positionB Vector3สี่เหลี่ยมผืนผ้าเคลื่อนไหวได้ดี อย่างไรก็ตามเมื่อมันมาถึง_positionBมันจะไม่เคลื่อนที่ในทิศทางตรงกันข้ามเหมือนอย่างที่ควร ฉันกลับไปที่โค้ดเพื่อดู ฉันมาถึงข้อสรุปว่าเป็นวัตถุย้ายที่ifงบในรหัสพลาดเฟรมซึ่งในตำแหน่ง rects _positionBเท่ากับ ฉันตัดสินใจที่จะปรับเปลี่ยนรหัสไปในทิศทางที่ตรงกันข้ามถ้าตำแหน่ง rects คือมากกว่าหรือเท่ากับ _positionBรหัสของฉันไม่ยาวเกินไปดังนั้นฉันจะแสดงด้านล่าง: using UnityEngine; using System.Collections; public class Rectangle : MonoBehaviour { private Vector3 _positionA = new Vector3(-0.97f, -4.28f); //Start position private Vector3 _positionB = new Vector3(11.87f, -4.28f); //End position private Transform _rect_tfm; private bool _atPosA = false, _atPosB = …
9 unity  c#  vector  mathematics  vector  matrix  unity  c#  transformation  java  3d  terrain-rendering  shading  ios  opengl-es  opengl  rendering  optimization  python  scripting  minecraft-modding  modding  pc  3d-meshes  mesh  culling  point-cloud  networking  interpolation  mathematics  game-design  ai  game-mechanics  animation  unreal-4  skeletal-animation  3dsmax  unity  c#  3d  opengl  c++  textures  unity  ide  cocos2d  cocos2d-x-js  unity  c#  mono  il2cpp  c++  game-loop  timer  linux  flash  actionscript-3  java  glsl  c++  vector  entity-component  c++  directx11  windows  visual-studio  libgdx  mouse  unity  c#  architecture  storage  unity  c#  rotation  coordinates  quaternion  vrpn  movement  vector  unreal-4  unity  shaders  unity  gui  text  bug  shooter  3d  animation  rendering  voxels  c++  mmo  multithreading  linux  textures  procedural-generation  terrain-rendering  multiplayer  mmo  game-state  java  android  libgdx  opengl  procedural-generation  unity  gui  3d  animation  tools  geometry-shader  mobile  advertisements  unity  c#  animation  scripting  unity  animation  unityscript  coroutines  unity  shaders  lighting  camera 
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.