Vector Shapes Disappearing
by Fox Trot · in Torque 2D Beginner · 04/14/2013 (9:25 am) · 5 replies
Why is it that when the camer pans past the center of a vector shape, it disappears? Aside from this, they can't be made concave, to my knowledge, which makes them almost useless.
Is there a fix for this and is there a way to make them concave (or plans to implement concave vector shapes)?
Is there a fix for this and is there a way to make them concave (or plans to implement concave vector shapes)?
About the author
#3
My "line" has a small OOBB box. Even if I add more points, the OOBB box does not resize. The only time I can make the box bigger is by using .setSize. Even that doesn't fully cover the vector shape. From what it looks like, the code is using the first point as the "center" for the oobb vector.
Example: I'm using vectorshape to draw lines where my edge collision lines are, because collision debug does not draw a line :(
[img]http://s30.postimg.org/46cn89u31/OOBB.jpg[/img]
I don't plan on really using them so it's not a game breaker for me. Only using it to debug my collision lines.
And I don't have a windows compiler to look into this and attempt a fix right now.
11/13/2014 (7:16 pm)
Sorry for digging old post, I seen this in action in T2D 3.1.My "line" has a small OOBB box. Even if I add more points, the OOBB box does not resize. The only time I can make the box bigger is by using .setSize. Even that doesn't fully cover the vector shape. From what it looks like, the code is using the first point as the "center" for the oobb vector.
Example: I'm using vectorshape to draw lines where my edge collision lines are, because collision debug does not draw a line :(
[img]http://s30.postimg.org/46cn89u31/OOBB.jpg[/img]
I don't plan on really using them so it's not a game breaker for me. Only using it to debug my collision lines.
And I don't have a windows compiler to look into this and attempt a fix right now.
#4
11/14/2014 (7:18 am)
Why don't you just set the scene to show collision shapes?// naturally you'd replace "SandboxScene" with your own scene object if it is // different SandboxScene.setDebugOn( "collision" ); // shows collision shapes as vector shapes SandboxScene.setDebugOff( "collision" ); // hides collision shapes
#5
mainScene.setDebugOn("collision");
I've tried
%Collision.setSceneLayer( 30 );
createPolygonBoxCollisionShape works fine.
11/15/2014 (7:25 pm)
I do that, but for some reason my lines don't draw.%Collision = new SceneObject() {
class = "LevelBuilderCollision";
CollisionObjectType = "Line";
};
%Collision.setBodyType( "static" );
%Collision.setSceneGroup( 15 );
%Collision.setSceneLayer( 0 );
%Collision.createEdgeCollisionShape( %StartPosition, %EndPosition );
mainScene.add(%Collision);mainScene.setDebugOn("collision");
I've tried
%Collision.setSceneLayer( 30 );
createPolygonBoxCollisionShape works fine.
Employee Michael Perry
ZombieShortbus