Commit Graph

19 Commits

Author SHA1 Message Date
James Golding
72fa7c6508 Use new VHACD library for generating auto convex collision (only enabled on windows until other platforms can test)
#codereview ori.cohen, ben.marsh, michael.trepka, mark.satterthwaite, dmitry.rekman

[CL 2495503 by James Golding in Main branch]
2015-03-30 07:26:43 -04:00
Lina Halper
d436b6fd26 #Physics: PhAT: Apply component space transform when we calculate min size
Merging

//depot/UE4-GDC2015/Engine/Source/...

to //depot/UE4/Engine/Source/...

[CL 2445323 by Lina Halper in Main branch]
2015-02-13 15:42:39 -05:00
Lina Halper
e13fc73e9d #PHYSICS: If smaller tha min, just assign min, not default prim size, which is huge
Merging

//depot/UE4-GDC2015/Engine/Source/Editor/UnrealEd/Private/PhysicsAssetUtils.cpp

to //depot/UE4/Engine/Source/Editor/UnrealEd/Private/PhysicsAssetUtils.cpp

[CL 2445310 by Lina Halper in Main branch]
2015-02-13 15:41:08 -05:00
Mikolaj Sieluzycki
fa01cacb6c Trim down the amount of UObject constructors.
#codereview Robert.Manuszewski

[CL 2429641 by Mikolaj Sieluzycki in Main branch]
2015-02-03 05:40:57 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Matthew Griffin
f1c4513760 Renaming FVector ClampSize and SafeNormal functions for clarity
Used DEPRECATED Macro to keep old names around in case I've missed anything

[CL 2370785 by Matthew Griffin in Main branch]
2014-11-26 10:01:12 -05:00
Mikolaj Sieluzycki
d43e69c4b9 Prepare cpp files for header cleanup.
#codereview Robert.Manuszewski

[CL 2356854 by Mikolaj Sieluzycki in Main branch]
2014-11-12 04:43:54 -05:00
Mikolaj Sieluzycki
59df49651b Engine private PCH cleanup.
#codereview Robert.Manuszewski

[CL 2348191 by Mikolaj Sieluzycki in Main branch]
2014-11-04 06:12:25 -05:00
Michael Noland
928559eaa0 Editor: Coding-standards fixes (TypeName [*|&] VariableName -> TypeName[*|&] VariableName)
[CL 2316341 by Michael Noland in Main branch]
2014-10-01 14:45:23 -04:00
Lina Halper
e513ea2300 Named FMatrix/FTransform unsafe Inverse to InverseFast, and InverseSafe,InverseSlow to Inverse as people often use Inverse as default function.
- Inverse was one of the main reasons of crashes via lots of functions. Seems making default Inverse to be safer version seems better.

[CL 2255081 by Lina Halper in Main branch]
2014-08-13 15:29:41 -04:00
Lina Halper
b51640d306 342312 FBX import failure in 4.4
- Two Nan Issues : 1. divide by 0 2. FMatrix inverse produces NaN if det == 0, so changed it to FTransform.

#code review: Ori.Cohen

[CL 2234908 by Lina Halper in Main branch]
2014-07-28 16:01:09 -04:00
Ori Cohen
1dba06c4c7 Fix non unity build
[CL 2123929 by Ori Cohen in Main branch]
2014-07-01 17:41:23 -04:00
Ori Cohen
823b7f0a42 Fix crash in PhAT when trying to create multi convex hull with soft vertices
[CL 2123513 by Ori Cohen in Main branch]
2014-07-01 13:10:32 -04:00
Ori Cohen
57345a5a7b Add fallback calculation for OBB in PhAT when multiple children are present
[CL 2104967 by Ori Cohen in Main branch]
2014-06-13 16:31:12 -04:00
Andrew Brown
b0f3feca6f Static mesh editor can now create Box/Sphyl and have multiple collision primitives, which can be manipulated.
#ttp 334968 - TOOLS FEATURE: Add primitive collision inside the static mesh editor

#branch UE4

#change
GenerateSimpleCollision funcs now return true if any collision was built
Moved Prompt to build collision into a func (to remove duplicate code), and modified so that the options are Yes=Replace, No=Add-To, Cancel = Cancel.
Added CalcBoundingSphyl code which is loosely based on the Sphere code in that it finds the best axis to align the sphyl with (but locally rotates so it can treat the Z axis as length, regardless). It they finds the radius to best enclose the Sphyl (same as Sphere, but 2D). Then it increase the length of the Sphyl until that encapsulates all the remaining points.

Replace instances of AddZeroed with Add(FKTypeElem()) so that the vtable would be created correctly if a base struct was introduced.
Moved PhysX code which scales the Elems from ModifyPrimitiveSize to their own struct func (ScaleElem) so that it could be used elsewhere.

Added new struct FPrimData which contains the PrimType and PrimIndex so we can look the corresponding collision Elem up in our BodySetup. The static mesh editor session which is open for a particular static mesh keeps track of these using the following:
IsPrimValid û Checks to see if the prim data could be valid
HasSelectedPrims û Returns true if there are any selected prims
IsSelectedPrim û Check to see if the prim data is selected
AddSelectedPrim û Adds prim data to our selection
RemoveSelectedPrim û Removes prim data from our selection
RemoveInvalidPrism - Removes any prims which are no longer valid from the selection
ClearSelectedPrims û Removes all the prim data from our selection
DuplicateSelectedPrims û Duplicates the selected prims
TranslateSelectedPrims - Translates the selected prims by a specified amount
RotateSelectedPrims - Rotates the selected prims by a specified amount
ScaleSelectedPrims - Scales the selected prims by a specified amount
CalcSelectedPrimsAABB - Calculates the bounding box of the selected prims
DeleteSelectedPrims û Deletes the selected prims
GetLastSelectedPrimTransform û Gets the transform of the last prim which was added to the selection.
GetPrimTransform - Gets the transform of a specified prim
SetPrimTransform - Sets the transform of a specified prim
Added placeholder calls to begin/end transaction where itÆs needed whenever the bodysetup prims are modified.

Added new Static Mesh Editor menu option to create a capsule/sphyl
Added dedicated collision toggle flag to the Static Mesh Editor so we could manage our own handling of the draw functions in order to inject hit proxies where needed so we can test when theyÆve been clicked on in the viewport.
Widget now works when selecting collision Elems. Space toggles the manipulation method.
SelectedPrims can be trans/rot/scaled using the editor widget.
Prims can be duplicated or deleted either using menu entries or keyboard shortcuts. Alt+drag is also supported for duplication.
ProcessClick was updated so that whenever a new selection type is clicked on the previous types are deselected (sockets, prims, edges), and other code location were updated to clear the selected prims where appropriate.
Modified OnFocusViewportToSelection so that it also focuses on the selected elems too
Modified SetSelectedSocket so that when passing NULL it deselects all the sockets

[CL 2104326 by Andrew Brown in Main branch]
2014-06-13 05:03:24 -04:00
Keith Judge
295e2c8f09 Move BodyFindConstraints to be a member of the PhysicsAsset so engine code can use it as well as editor. Fixes compile error.
[CL 2067974 by Keith Judge in Main branch]
2014-05-09 06:00:58 -04:00
Ori Cohen
65611309d0 change sphyl/sphere to two different options
[CL 2065048 by Ori Cohen in Main branch]
2014-05-06 19:05:21 -04:00
Lina Halper
d8bcd104bc Fixed issue with minimum size too large to create physics asset issue.
[CL 2040205 by Lina Halper in Main branch]
2014-04-23 17:37:40 -04:00
Tim Sweeney
324683ce78 Engine source (Main branch up to CL 2026164) 2014-03-14 14:13:41 -04:00