Skip to content

Commit

Permalink
modif perso plugin Sweenie
Browse files Browse the repository at this point in the history
basé sur NewtonUnityPlugin-31fe148345e3653fdbb401c8675526d49dc95d09

svenberra@31fe148

avec prise en compte du calcul des inerties ou de leur specification dans newtonbody
  • Loading branch information
ple666 committed Jun 7, 2018
1 parent 10bba2e commit ddb4470
Show file tree
Hide file tree
Showing 26 changed files with 1,048 additions and 238 deletions.
4 changes: 2 additions & 2 deletions Demos/Assets/Scripts/PlayerDriver.cs
Expand Up @@ -9,7 +9,7 @@ public class PlayerDriver : MonoBehaviour
void Start ()
{
motor = transform.Find("motor").GetComponent<NewtonBody>();
motorJoint = transform.Find("motor").GetComponent<NewtonUniversalActuator>();
motorJoint = transform.Find("motor").GetComponent<NewtonDoubleHingeActuator>();
}

// Update is called once per frame
Expand Down Expand Up @@ -52,5 +52,5 @@ void Update ()
}

NewtonBody motor = null;
NewtonUniversalActuator motorJoint = null;
NewtonDoubleHingeActuator motorJoint = null;
}
Binary file modified Demos/Assets/demo_01_BasicCollisionPrimives.unity
Binary file not shown.
33 changes: 17 additions & 16 deletions Demos/Demos.csproj
Expand Up @@ -14,11 +14,12 @@
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Unity Subset v3.5</TargetFrameworkProfile>
<CompilerResponseFile></CompilerResponseFile>
<UnityProjectGenerator>VSTU</UnityProjectGenerator>
<UnityProjectType>Game:1</UnityProjectType>
<UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
<UnityVersion>5.5.0f3</UnityVersion>
<UnityBuildTarget>StandaloneWindows:5</UnityBuildTarget>
<UnityVersion>5.5.4p4</UnityVersion>
<RootNamespace></RootNamespace>
<LangVersion Condition=" '$(VisualStudioVersion)' != '10.0' ">4</LangVersion>
<LangVersion>4</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -27,7 +28,7 @@
<IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU</DefineConstants>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_4;UNITY_5_5;UNITY_5;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU</DefineConstants>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand All @@ -37,7 +38,7 @@
<IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_0;UNITY_5_5;UNITY_5;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU</DefineConstants>
<DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_5_4;UNITY_5_5;UNITY_5;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_SCRIPTING_NEW_CSHARP_COMPILER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VIDEO;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU</DefineConstants>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
Expand All @@ -50,31 +51,31 @@
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="UnityEngine">
<HintPath>Library\UnityAssemblies\UnityEngine.dll</HintPath>
<HintPath>C:/Unity/Editor/Data/Managed/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>Library\UnityAssemblies\UnityEngine.UI.dll</HintPath>
<HintPath>C:/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Networking">
<HintPath>Library\UnityAssemblies\UnityEngine.Networking.dll</HintPath>
<HintPath>C:/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PlaymodeTestsRunner">
<HintPath>Library\UnityAssemblies\UnityEngine.PlaymodeTestsRunner.dll</HintPath>
<HintPath>C:/Unity/Editor/Data/UnityExtensions/Unity/PlaymodeTestsRunner/UnityEngine.PlaymodeTestsRunner.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Analytics">
<HintPath>Library\UnityAssemblies\UnityEngine.Analytics.dll</HintPath>
<HintPath>C:/Unity/Editor/Data/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.HoloLens">
<HintPath>Library\UnityAssemblies\UnityEngine.HoloLens.dll</HintPath>
<HintPath>C:/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VR">
<HintPath>Library\UnityAssemblies\UnityEngine.VR.dll</HintPath>
</Reference>
<Reference Include="UnityEditor">
<HintPath>Library\UnityAssemblies\UnityEditor.dll</HintPath>
<HintPath>C:/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/RuntimeEditor/UnityEngine.VR.dll</HintPath>
</Reference>
<Reference Include="NewtonPlugin">
<HintPath>Assets\Plugins\NewtonPlugin.dll</HintPath>
<HintPath>Assets/Plugins/NewtonPlugin.dll</HintPath>
</Reference>
<Reference Include="UnityEditor">
<HintPath>C:/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
19 changes: 8 additions & 11 deletions Demos/Demos.sln
@@ -1,23 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2008

Project("{8ADE2D34-FF8C-8D95-71BB-9F13D4AF8C6A}") = "Demos", "Assembly-CSharp.csproj", "{AC7FE60A-8433-0635-B1FC-FF3CEE16D926}"

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2015
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demos", "Demos.csproj", "{2F9F00E4-B22A-AA75-CF0A-D5419DE51AD0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AC7FE60A-8433-0635-B1FC-FF3CEE16D926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC7FE60A-8433-0635-B1FC-FF3CEE16D926}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC7FE60A-8433-0635-B1FC-FF3CEE16D926}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC7FE60A-8433-0635-B1FC-FF3CEE16D926}.Release|Any CPU.Build.0 = Release|Any CPU
{2F9F00E4-B22A-AA75-CF0A-D5419DE51AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F9F00E4-B22A-AA75-CF0A-D5419DE51AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F9F00E4-B22A-AA75-CF0A-D5419DE51AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F9F00E4-B22A-AA75-CF0A-D5419DE51AD0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion Demos/ProjectSettings/ProjectVersion.txt
@@ -1 +1 @@
m_EditorVersion: 5.5.0f3
m_EditorVersion: 5.5.4p4
2 changes: 1 addition & 1 deletion NewtonPlugin/NewtonBody.cs
Expand Up @@ -340,7 +340,7 @@ protected virtual void CreateBodyAndCollision()
public float m_Ixx = 0.0f;
public float m_Iyy = 0.0f;
public float m_Izz = 0.0f;
public bool m_CalculateInertia=false;
public bool m_CalculateInertia = false;
public bool m_isScene = false;
public bool m_showGizmo = false;
public float m_gizmoScale = 1.0f;
Expand Down

0 comments on commit ddb4470

Please sign in to comment.