Skip to content

Commit

Permalink
4.9 update.
Browse files Browse the repository at this point in the history
This is a compatibility update, tested in 4.9p4.
  • Loading branch information
tk-master committed Aug 30, 2015
1 parent 8e900e1 commit a981de1
Show file tree
Hide file tree
Showing 25 changed files with 360 additions and 320 deletions.
Binary file modified Binaries/Win64/UE4Editor-OceanProject.dll
Binary file not shown.
29 changes: 14 additions & 15 deletions Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ InitialAverageFrameRate=0.016667
+PhysicalSurfaces=(Type=SurfaceType2,Name="Wood")
+PhysicalSurfaces=(Type=SurfaceType3,Name="Metal")

[/Script/Engine.UserInterfaceSettings]
RenderFocusRule=NavigationOnly
DefaultCursor=None
TextEditBeamCursor=None
CrosshairsCursor=None
GrabHandCursor=None
GrabHandClosedCursor=None
SlashedCircleCursor=None
ApplicationScale=1.000000
UIScaleRule=Vertical
CustomScalingRuleClass=None
UIScaleCurve=(EditorCurveData=(Keys=((Time=1080.000000,Value=1.000000))),ExternalCurve=None)

[/Script/Engine.RendererSettings]
r.MobileHDR=True
r.AllowOcclusionQueries=True
Expand All @@ -64,9 +51,9 @@ r.DefaultFeature.Bloom=True
r.DefaultFeature.AmbientOcclusion=True
r.DefaultFeature.AmbientOcclusionStaticFraction=True
r.DefaultFeature.AutoExposure=True
r.DefaultFeature.MotionBlur=False
r.DefaultFeature.MotionBlur=True
r.DefaultFeature.LensFlare=True
r.DefaultFeature.AntiAliasing=1
r.DefaultFeature.AntiAliasing=2
r.EarlyZPass=3
r.EarlyZPassMovable=False
r.DBuffer=False
Expand All @@ -89,4 +76,16 @@ ServerDefaultMap=/Engine/Maps/Entry
GlobalDefaultGameMode=/Game/ShipsAndExamples/CustomThirdPerson/Blueprints/ThirdPersonGameMode.ThirdPersonGameMode_C
GlobalDefaultServerGameMode=None

[/Script/Engine.UserInterfaceSettings]
RenderFocusRule=NavigationOnly
DefaultCursor=None
TextEditBeamCursor=None
CrosshairsCursor=None
GrabHandCursor=None
GrabHandClosedCursor=None
SlashedCircleCursor=None
ApplicationScale=1.000000
UIScaleRule=Vertical
CustomScalingRuleClass=None
UIScaleCurve=(EditorCurveData=(PreInfinityExtrap=RCCE_Constant,PostInfinityExtrap=RCCE_Constant,Keys=((Time=1080.000000,Value=1.000000))),ExternalCurve=None)

Binary file modified Content/Maps/OceanExampleMap_01.umap
Binary file not shown.
Binary file modified Content/Ocean/Meshes/SM_OceanPlane.uasset
Binary file not shown.
Binary file modified Content/Ocean/Meshes/SM_OceanPlaneFar.uasset
Binary file not shown.
Binary file modified Content/Ocean/Meshes/SM_OceanPlaneFarSpherical.uasset
Binary file not shown.
Binary file modified Content/ShipsAndExamples/BP_Boat.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion OceanProject.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "4.8",
"EngineAssociation": "4.9",
"Category": "",
"Description": "",
"Modules": [
Expand Down
Binary file modified Plugins/OceanPlugin/Binaries/Win64/UE4Editor-OceanPlugin.dll
Binary file not shown.
Binary file modified Plugins/OceanPlugin/Binaries/Win64/UE4Editor-OceanPlugin.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Unreal Engine version: 4.8.3
* Created on: 2015/04/26
*
* Last Edited on: 2015/04/26
* Last Edited on: 2015/08/27
* Last Edited by: TK-Master
*
* -------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*
* Created by: TK-Master
* Project name: OceanProject
* Unreal Engine version: 4.8.3
* Unreal Engine version: 4.9
* Created on: 2015/03/29
*
* Last Edited on: 2015/03/29
* Last Edited on: 2015/08/28
* Last Edited by: TK-Master
*
* -------------------------------------------------
Expand All @@ -20,72 +20,16 @@

#pragma once

#include "OceanManager.h"
#include "OceanPluginPrivatePCH.h"
#include "BuoyantDestructibleComponent.h"
#include "BuoyantDestructible.generated.h"

UCLASS()
class ABuoyantDestructible : public ADestructibleActor
class ABuoyantDestructible : public AActor
{
GENERATED_UCLASS_BODY()

protected:
virtual void Tick(float DeltaTime) override;
virtual void PostLoad() override;

private:
float _SignedRadius;
float _baseAngularDamping;
float _baseLinearDamping;

public:

UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category = "Buoyancy Settings")
AOceanManager* OceanManager;

/* Density of each chunk */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float ChunkDensity;

/* Density of water */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float FluidDensity;

/* Linear damping when chunk is in fluid */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float FluidLinearDamping;

/* Angular damping when chunk is in fluid */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float FluidAngularDamping;

UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category = "Buoyancy Settings")
FVector VelocityDamper;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
bool ClampMaxVelocity;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float MaxUnderwaterVelocity;

/* Radius of the test point */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float TestPointRadius;

UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Buoyancy Settings")
bool DrawDebugPoints;

UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Buoyancy Settings")
bool EnableWaveForces;

UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Buoyancy Settings")
float WaveForceMultiplier;

/* Use a low value (or even zero) if the chunks sleep too easily on water */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Advanced")
float ChunkSleepThreshold;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Advanced")
float ChunkStabilizationThreshold;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = BuoyantDestructible, meta = (ExposeFunctionCategories = "Destruction,Components|Destructible,Buoyancy Settings,Advanced", AllowPrivateAccess = "true"))
UBuoyantDestructibleComponent* BuoyantDestructibleComponent;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*=================================================
* FileName: BuoyantDestructibleComponent.h
*
* Created by: TK-Master
* Project name: OceanProject
* Unreal Engine version: 4.9
* Created on: 2015/08/27
*
* Last Edited on: 2015/08/28
* Last Edited by: TK-Master
*
* -------------------------------------------------
* For parts referencing UE4 code, the following copyright applies:
* Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
*
* Feel free to use this software in any commercial/free game.
* Selling this as a plugin/item, in whole or part, is not allowed.
* See "OceanProject\License.md" for full licensing details.
* =================================================*/

#pragma once

#include "OceanManager.h"
#include "OceanPluginPrivatePCH.h"
#include "BuoyantDestructibleComponent.generated.h"

UCLASS(ClassGroup = Physics, hidecategories = (Object, Mesh, "Components|SkinnedMesh", Mirroring, Activation, "Components|Activation"), config = Engine, editinlinenew, meta = (BlueprintSpawnableComponent))
class UBuoyantDestructibleComponent : public UDestructibleComponent
{
GENERATED_UCLASS_BODY()

protected:
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
virtual void InitializeComponent() override;

private:
float _SignedRadius;
float _baseAngularDamping;
float _baseLinearDamping;

public:
UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category = "Buoyancy Settings")
AOceanManager* OceanManager;

/* Density of each chunk */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float ChunkDensity;

/* Density of water */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float FluidDensity;

/* Linear damping when chunk is in fluid */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float FluidLinearDamping;

/* Angular damping when chunk is in fluid */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float FluidAngularDamping;

UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadWrite, Category = "Buoyancy Settings")
FVector VelocityDamper;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
bool ClampMaxVelocity;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float MaxUnderwaterVelocity;

/* Radius of the test point */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buoyancy Settings")
float TestPointRadius;

UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Buoyancy Settings")
bool DrawDebugPoints;

UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Buoyancy Settings")
bool EnableWaveForces;

UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Buoyancy Settings")
float WaveForceMultiplier;

/*
* Sets the mass-normalized kinetic energy threshold below which an actor may go to sleep.
* Default physx value is ~50.0f (we set it 0 to avoid weird sleeping chunks on water).
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Advanced")
float ChunkSleepThreshold;

/*
* Sets the mass-normalized kinetic energy threshold below which an actor may participate in stabilization.
* (This value has no effect if PxSceneFlag::eENABLE_STABILIZATION was not enabled on the PxSceneDesc)
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Advanced")
float ChunkStabilizationThreshold;

};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ class ACustomVehicleController : public APlayerController

//--Custom debugging console commands--

//UFUNCTION(exec, BlueprintImplementableEvent, meta = (DisplayName = "Console Command ~ enableoceanssr"))
//virtual void EnableOceanSSR();

UFUNCTION(exec)
virtual void DrawBuoyancyPoints();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void UBuoyancyComponent::ApplyUprightConstraint()
ConstraintInstance.TwistLimitStiffness = StayUprightStiffness;
ConstraintInstance.TwistLimitDamping = StayUprightDamping;

ConstraintInstance.AngularRotationOffset = -UpdatedPrimitive->GetComponentRotation() + StayUprightDesiredRotation;
ConstraintInstance.AngularRotationOffset = UpdatedPrimitive->GetComponentRotation().GetInverse() + StayUprightDesiredRotation;

//UPhysicsConstraintComponent* ConstraintComp = NewObject<UPhysicsConstraintComponent>(UpdatedPrimitive);
if (ConstraintComp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ void UBuoyancyForceComponent::ApplyUprightConstraint(UPrimitiveComponent* BasePr
ConstraintInstance.TwistLimitStiffness = StayUprightStiffness;
ConstraintInstance.TwistLimitDamping = StayUprightDamping;

ConstraintInstance.AngularRotationOffset = -BasePrimComp->GetComponentRotation() + StayUprightDesiredRotation;
ConstraintInstance.AngularRotationOffset = BasePrimComp->GetComponentRotation().GetInverse() + StayUprightDesiredRotation;

//UPhysicsConstraintComponent* ConstraintComp = NewObject<UPhysicsConstraintComponent>(BasePrimComp);
if (ConstraintComp)
Expand Down
Loading

0 comments on commit a981de1

Please sign in to comment.