Delta Engine
»
Support
»
Physics
»
VisualPhysicsBox not showing the same as debug.
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 a8bcd5cec16dAll 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.
|
|
|
|
Medals:  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.
|
|
|
|
Joined: 8/21/2011(UTC) Posts: 28
Thanks: 1 times
|
Originally Posted by: Benjamin Nitschke (DeltaEngine)  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
|
|
|
|
Delta Engine
»
Support
»
Physics
»
VisualPhysicsBox not showing the same as debug.
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.