Parcourir la source

Capsule collider works

Marko Pintera il y a 11 ans
Parent
commit
d4f4fb55e1

+ 2 - 2
BansheeEditor/Source/BsHandleSliderLine.cpp

@@ -8,8 +8,8 @@
 
 namespace BansheeEngine
 {
-	const float HandleSliderLine::CAPSULE_RADIUS = 0.1f;
-	const float HandleSliderLine::SPHERE_RADIUS = 0.25f;
+	const float HandleSliderLine::CAPSULE_RADIUS = 0.05f;
+	const float HandleSliderLine::SPHERE_RADIUS = 0.2f;
 
 	HandleSliderLine::HandleSliderLine(const Vector3& direction, float length, float snapValue, bool fixedScale)
 		:HandleSlider(fixedScale, snapValue), mLength(length), mDelta(0.0f)

+ 2 - 5
BansheeEditor/Source/BsSceneEditorWidget.cpp

@@ -115,12 +115,9 @@ namespace BansheeEngine
 		if (!toSceneViewPos(event.screenPos, scenePos))
 			return;
 
-		if (mLeftButtonPressed)
-		{
-			Ray inputRay = mCamera->screenPointToRay(scenePos);
+		Ray inputRay = mCamera->screenPointToRay(scenePos);
 
-			HandleManager::instance().handleInput(scenePos, inputRay, mLeftButtonPressed);
-		}
+		HandleManager::instance().handleInput(scenePos, inputRay, mLeftButtonPressed);
 	}
 
 	void SceneEditorWidget::onPointerReleased(const PointerEvent& event)

+ 3 - 3
BansheeUtility/Include/BsVector3.h

@@ -389,10 +389,10 @@ namespace BansheeEngine
 		 */
 		void orthogonalComplement(Vector3& a, Vector3& b)
 		{
-			if (fabs(a.x) > fabs(a.y))
-				a = Vector3(-a.z, 0, a.x);
+			if (fabs(x) > fabs(y))
+				a = Vector3(-z, 0, x);
 			else
-				a = Vector3(0, a.z, -a.y);
+				a = Vector3(0, z, -y);
 
 			b = cross(a);