示例3: OnTriggerStay2D ▲点赞 3▼ voidOnTriggerStay2D(Collider2D coll){if(coll.transform.tag =="Object"&& coll.GetComponent<MovableObject>() !=null) {boolisOnRightSide = coll.transform.position.x > transform.position.x;if(isRightHeading == isOnRightSide && coll.gameObject.GetComponent<Movable...
UE_LOG(LogTemp, Warning, TEXT("Grab Pressed!"));// Get the hit object with physical bodyFHitResult HitObj = FindTheFirstReachingObject();autoGrabObjComponent = HitObj.GetComponent();autoGrabObjActor = HitObj.GetActor();// If hit a object, grab it by using grab componentif(GrabObjActor...
UE_LOG(LogTemp, Warning, TEXT("Grab Pressed!"));// Get the hit object with physical bodyFHitResult HitObj = FindTheFirstReachingObject();autoGrabObjComponent = HitObj.GetComponent();autoGrabObjActor = HitObj.GetActor();// If hit a object, grab it by using grab componentif(GrabObjActor...