This commit is contained in:
Wojtek Figat
2021-09-24 16:38:26 +02:00
parent 799d79bd2f
commit 777febc198
3 changed files with 6 additions and 15 deletions

View File

@@ -162,7 +162,7 @@ namespace FlaxEditor.Windows
WatermarkText = "Search...",
Parent = this,
};
_searchBox.TextChanged += OnSearchBoxTextChanged;
_searchBox.TextChanged += Refresh;
_hScroll = new HScrollBar(this, Height - _scrollSize, Width - _scrollSize, _scrollSize)
{
ThumbThickness = 10,
@@ -229,11 +229,6 @@ namespace FlaxEditor.Windows
menu.Show(_viewDropdown.Parent, _viewDropdown.BottomLeft);
}
private void OnSearchBoxTextChanged()
{
Refresh();
}
private void ToggleLogTypeShow(LogType type)
{
_logTypeShowMask ^= (int)type;

View File

@@ -12,9 +12,6 @@
#include "Engine/Scripting/Script.h"
#include <ThirdParty/PhysX/extensions/PxJoint.h>
#define PX_PARENT_ACTOR_ID PxJointActorIndex::eACTOR0
#define PX_TARGET_ACTOR_ID PxJointActorIndex::eACTOR1
Joint::Joint(const SpawnParams& params)
: Actor(params)
, _joint(nullptr)
@@ -75,7 +72,7 @@ void Joint::SetTargetAnchor(const Vector3& value)
if (_joint)
{
_joint->setLocalPose(PX_TARGET_ACTOR_ID, PxTransform(C2P(_targetAnchor), C2P(_targetAnchorRotation)));
_joint->setLocalPose(PxJointActorIndex::eACTOR1, PxTransform(C2P(_targetAnchor), C2P(_targetAnchorRotation)));
}
}
@@ -88,7 +85,7 @@ void Joint::SetTargetAnchorRotation(const Quaternion& value)
if (_joint)
{
_joint->setLocalPose(PX_TARGET_ACTOR_ID, PxTransform(C2P(_targetAnchor), C2P(_targetAnchorRotation)));
_joint->setLocalPose(PxJointActorIndex::eACTOR1, PxTransform(C2P(_targetAnchor), C2P(_targetAnchorRotation)));
}
}
@@ -119,7 +116,7 @@ void Joint::Create()
// Create joint object
JointData data;
data.Physics = Physics::GetPhysics();
data.Actor0 = parent ? parent->GetRigidActor() : nullptr;
data.Actor0 = parent->GetRigidActor();
data.Actor1 = target ? target->GetRigidActor() : nullptr;
data.Pos0 = _localTransform.Translation;
data.Rot0 = _localTransform.Orientation;
@@ -332,6 +329,6 @@ void Joint::OnTransformChanged()
if (_joint)
{
_joint->setLocalPose(PX_PARENT_ACTOR_ID, PxTransform(C2P(_localTransform.Translation), C2P(_localTransform.Orientation)));
_joint->setLocalPose(PxJointActorIndex::eACTOR0, PxTransform(C2P(_localTransform.Translation), C2P(_localTransform.Orientation)));
}
}

View File

@@ -10,7 +10,7 @@ class IPhysicsActor;
/// <summary>
/// A base class for all Joint types. Joints constrain how two rigidbodies move relative to one another (for example a door hinge).
/// One of the bodies in the joint must always be movable (non-kinematic).
/// One of the bodies in the joint must always be movable (non-kinematic and non-static).
/// </summary>
/// <remarks>
/// Joint constraint is created between the parent physic actor (rigidbody, character controller, etc.) and the specified target actor.
@@ -125,7 +125,6 @@ public:
/// <summary>
/// Gets the native PhysX joint object.
/// </summary>
/// <returns>The PhysX joint.</returns>
FORCE_INLINE PxJoint* GetPhysXJoint() const
{
return _joint;