diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs index ae1c5baf7..61d180362 100644 --- a/Source/Editor/Windows/OutputLogWindow.cs +++ b/Source/Editor/Windows/OutputLogWindow.cs @@ -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; diff --git a/Source/Engine/Physics/Joints/Joint.cpp b/Source/Engine/Physics/Joints/Joint.cpp index 2a8cc57ca..984d90ba1 100644 --- a/Source/Engine/Physics/Joints/Joint.cpp +++ b/Source/Engine/Physics/Joints/Joint.cpp @@ -12,9 +12,6 @@ #include "Engine/Scripting/Script.h" #include -#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))); } } diff --git a/Source/Engine/Physics/Joints/Joint.h b/Source/Engine/Physics/Joints/Joint.h index 3d3a833ec..e8da71c91 100644 --- a/Source/Engine/Physics/Joints/Joint.h +++ b/Source/Engine/Physics/Joints/Joint.h @@ -10,7 +10,7 @@ class IPhysicsActor; /// /// 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). /// /// /// Joint constraint is created between the parent physic actor (rigidbody, character controller, etc.) and the specified target actor. @@ -125,7 +125,6 @@ public: /// /// Gets the native PhysX joint object. /// - /// The PhysX joint. FORCE_INLINE PxJoint* GetPhysXJoint() const { return _joint;