Permalink
Browse files

Made it possible to turh the 2D physics world globally.

  • Loading branch information...
Thomas Gravgaard
Thomas Gravgaard committed May 21, 2012
1 parent 6d1dc65 commit 5b9aa0f17b5dc4e643af90f5b22b2d98aa7cf1fc
View
@@ -30,4 +30,5 @@ obj/
/Tests/Unity.Tests/Library
/Tests/Unity.Tests/Temp
/Demos/*/Temp
-/Demos/*/Library
+/Demos/*/Library
+*.ncrunchsolution
@@ -43,6 +43,7 @@ public static class ApplicationSettings
/// If you do it a lot, consider flipping this and making the colliders kinematic.
/// </summary>
public static bool Physics_MoveStaticColliders = true;
+ public static Physics.To2dMode Physics_Default2DMode = Physics.To2dMode.DropY;
public static class DefaultCapacities
{
@@ -17,7 +17,7 @@ public abstract class Collider : Component
public bool isTrigger;
[ContentSerializer(Optional = true)]
public string material;
- internal Physics.To2dMode to2dMode = Physics.To2dMode.DropY;
+ internal Physics.To2dMode to2dMode = ApplicationSettings.Physics_Default2DMode;
#endregion
[ContentSerializerIgnore]

11 comments on commit 5b9aa0f

@stan911nfs

This comment has been minimized.

Show comment Hide comment
@stan911nfs

stan911nfs May 21, 2012

Ok there are 2 errors even though it shows dozens.

  • The first one shows that I cannot access Physics_default2DMode due to its protection level. (Even though it is kept in public)
  • The second one shows that there is a an ambiguity between the one found in the Components/Colliders/Colliders.cs and the one that is found in the ApplicationSettings.cs

Ok there are 2 errors even though it shows dozens.

  • The first one shows that I cannot access Physics_default2DMode due to its protection level. (Even though it is kept in public)
  • The second one shows that there is a an ambiguity between the one found in the Components/Colliders/Colliders.cs and the one that is found in the ApplicationSettings.cs
@fehaar

This comment has been minimized.

Show comment Hide comment
@fehaar

fehaar May 21, 2012

Owner
Owner

fehaar replied May 21, 2012

@stan911nfs

This comment has been minimized.

Show comment Hide comment
@stan911nfs

stan911nfs May 21, 2012

Its kinda of working only thing is that its floating up rather than falling down.

Its kinda of working only thing is that its floating up rather than falling down.

@fehaar

This comment has been minimized.

Show comment Hide comment
@fehaar

fehaar May 21, 2012

Owner
Owner

fehaar replied May 21, 2012

@stan911nfs

This comment has been minimized.

Show comment Hide comment
@stan911nfs

stan911nfs May 21, 2012

I get the protection error everytime. However when I build the solution it clears off.
Its kinda annoying.
Stan

I get the protection error everytime. However when I build the solution it clears off.
Its kinda annoying.
Stan

@fehaar

This comment has been minimized.

Show comment Hide comment
@fehaar

fehaar May 21, 2012

Owner
Owner

fehaar replied May 21, 2012

@stan911nfs

This comment has been minimized.

Show comment Hide comment
@stan911nfs

stan911nfs May 21, 2012

Mine is kept specific to one platform. As it takes time to build for all platforms.
Plus I noticed something disturbing. My scene has the rigidbody cube rotated to an angle that when played it will be landing on its edge on the floor. In XNA the cube is in its default angle that is xyz (0,0,0). But the collision takes place like the one found in Unity. What I meant was
It is mimicking the motion of a falling rotated cube but when we look at it we can say it is not responding to any kind of rotation which is done by the physics.
Stan
P.S. Saw your office on the net, green with envy.

Mine is kept specific to one platform. As it takes time to build for all platforms.
Plus I noticed something disturbing. My scene has the rigidbody cube rotated to an angle that when played it will be landing on its edge on the floor. In XNA the cube is in its default angle that is xyz (0,0,0). But the collision takes place like the one found in Unity. What I meant was
It is mimicking the motion of a falling rotated cube but when we look at it we can say it is not responding to any kind of rotation which is done by the physics.
Stan
P.S. Saw your office on the net, green with envy.

@fehaar

This comment has been minimized.

Show comment Hide comment
@fehaar

fehaar May 21, 2012

Owner

Is it the graphics that is out of sync with the physics or the rotation that is not getting propagated back into the gameobject? Can you try using the fallback rendering (another switch in ApplicationSettings)?

Reminds me that I really should make that physics test/demo scene in Unity... :P

Yeah. The office is pretty neat. Where did you see the pictures?

Owner

fehaar replied May 21, 2012

Is it the graphics that is out of sync with the physics or the rotation that is not getting propagated back into the gameobject? Can you try using the fallback rendering (another switch in ApplicationSettings)?

Reminds me that I really should make that physics test/demo scene in Unity... :P

Yeah. The office is pretty neat. Where did you see the pictures?

@stan911nfs

This comment has been minimized.

Show comment Hide comment
@stan911nfs

stan911nfs May 21, 2012

The cube does not respond to rotation which is brought in with Unity however it takes the position and movement in the game space quite correctly.
I will try the fallback rendering

You would be doing us another big favor if you make demo scene

Its not your office per se, its pressplay office that I saw in the carrier openings at pressplay.dk

The cube does not respond to rotation which is brought in with Unity however it takes the position and movement in the game space quite correctly.
I will try the fallback rendering

You would be doing us another big favor if you make demo scene

Its not your office per se, its pressplay office that I saw in the carrier openings at pressplay.dk

@fehaar

This comment has been minimized.

Show comment Hide comment
@fehaar

fehaar May 21, 2012

Owner
Owner

fehaar replied May 21, 2012

@stan911nfs

This comment has been minimized.

Show comment Hide comment
@stan911nfs

stan911nfs May 21, 2012

I set the fallbackrendering to true in Game1.initialize. Still not working

I will see if I can find some for you.
I am pretty good at finding problems, in fact I get problems that are unique in nature.
Stan

I set the fallbackrendering to true in Game1.initialize. Still not working

I will see if I can find some for you.
I am pretty good at finding problems, in fact I get problems that are unique in nature.
Stan

Please sign in to comment.