Extruded Path Mesh starts thin in acute angle

Malarkey

27-02-2015 13:04:16

Hey!

Here is my code:


Procedural::Path p;
p.addPoint(this->startPos);
for(int i = 0; i < this->streetNodes.size(); i++){
Ogre::Vector3 pos = this->streetNodes.endPos;
p.addPoint(pos);
}
Procedural::Shape s = Procedural::Shape().addPoint(-1.2f,.2f).addPoint(-1.f,.2f).addPoint(-.9f,.1f).addPoint(.9f,.1f).addPoint(1.f,.2f).addPoint(1.2f,.2f).scale(2).setOutSide(Procedural::SIDE_LEFT);

Ogre::String entityName = NameGenerator::Next("extrudedMesh");
Procedural::Extruder().setExtrusionPath(&p).setCapped(false).setShapeToExtrude(&s).setUTile(20.f).realizeMesh(entityName);
Ogre::Entity* streetEntity = GameManager::getSingeltonPtr()->getSceneManager()->createEntity(entityName);
Ogre::SceneNode* node1= GameManager::getSingeltonPtr()->getSceneManager()->getRootSceneNode()->createChildSceneNode(NameGenerator::Next("StreetNode"));
entitySphere1->getBoundingBox();
node1->attachObject(streetEntity);




Everything works fine, but when I set a following point in acute angle to the previous point, the shape starts thinner and gets thiker (up to normal, desired size) in target-direction. This behaviour is stronger when the distance between the points is greater.

I do not know if this is a bug or a feature :D Anyway, how can I disable this? :)


Thanks!

(Great library, by the way. Oh, and another question: In the OgreWiki the SVG stuff looks pretty easy, but I don't have any SVG-methods or headers in my SDK (0.2) ?! :o )

mikachu

28-02-2015 14:21:22

Hi,

Good to see you like it.
You should really upgrade your SDK to 0.3unstable, the 0.2 version is really becoming old, and some bugs have only been resolved in this new version. (please tell me if you still see the bug after upgrading)
You can either build it yourself from latest source, or use one of the snapshots Transporter regularly (http://www.ogre3d.org/forums/viewtopic.php?f=4&t=69274)

Malarkey

28-02-2015 22:46:47

Okay, I will test it and post the results tomorrow :) Thanks for your help