Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline s990we  
#1 Posted : Monday, January 30, 2012 1:57:20 AM(UTC)
s990we

Joined: 8/24/2011(UTC)
Posts: 7

Physics.CreateTerrain (green):
Why is it rotated? Shouldn't a heighmap follow the plane thing (ground that the pyramid stands on)?

VisualPhysicsBox (red):
This seems to be a bug, the textured box is not the same as the debug lines (and collision)...



Not sure if the templates is updated.
Code:
Settings.Modules.PhysicsModule = "Jitter"; 

In Program.cs fails (PhysicsModule is readonly)
The font drawing methos also dont work.

Tested with a8bcd5cec16d

All the code is added last in the constructor for the "Advanced Game" template.
Code:
VisualPhysicsBox test = new VisualPhysicsBox(
	Vector.UnitY * -30,
	20, 10, 5, Color.Red,
	new MaterialData()
	{
		DiffuseMapName = "DeltaEngineLogo"
	})
	{
		DebugDrawColor = Color.Red,
	};
test.Body.Mass = 50;
shapesToDraw.Add(test);
Physics.DebugEnabled = true;

float[,] heightMap = 
{
	{0,1,2},
	{0,1,2},
	{0,1,2},
	{0,1,2},
	{0,1,2},
};
PhysicsBody ps = Physics.CreateTerrain(heightMap, 5, 5);
ps.DebugColor = Color.Green;
ps.IsStatic = true;


s990we attached the following image(s):
delta_physics.jpg (188kb) downloaded 15 time(s).

You cannot view/download attachments. Try to login or register.

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Monday, January 30, 2012 6:43:51 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
That really looks strange. My guess would be that the DebugDraw does not take any rotation into account (as seen by the boxes) because it uses Box.DrawOutline, which does not support any rotation yet.

We will investigate a bit in the next days. Thanks for the detailed bug report, I will open bugs for each of the issues.
Offline Amer  
#3 Posted : Monday, January 30, 2012 9:54:07 AM(UTC)
Amer

Joined: 8/21/2011(UTC)
Posts: 28

Thanks: 1 times
Originally Posted by: Benjamin Nitschke (DeltaEngine) Go to Quoted Post
That really looks strange. My guess would be that the DebugDraw does not take any rotation into account (as seen by the boxes) because it uses Box.DrawOutline, which does not support any rotation yet.

We will investigate a bit in the next days. Thanks for the detailed bug report, I will open bugs for each of the issues.


Actually the non rotated is only the BoundingBox and not the full transformation of the physics shape,so thats correct, the correct transformation is the VisualPhysicsBox.

About the terrain, at the moment as i may know there is no debug rappresentation of it.

Hope this helps,

Amer
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2018, Yet Another Forum.NET
This page was generated in 0.090 seconds.