|
| cyanescent |
Post
#1
|
|
Newbie Group: Members Posts: 6 Joined: 5-May 07 Member No.: 1,130 |
I
am playing around with transitions and face normals, and noticed that
the normals created with QuadFace3D.createnormale() (and TriFace3D) are
pointing in the inverse y direction:
CODE // obj3D contains sorted vertex coordinates var ref:QuadFace3D = new QuadFace3D( new Object3D(), obj3D.aPoints[0], obj3D.aPoints[2], obj3D.aPoints[3], obj3D.aPoints[1] ); // created vector needs to have an inverse y co-ordinate to be moved in the correct direction var refv:Vector = new Vector( ref.createNormale().x, -ref.createNormale().y, ref.createNormale().z ); var refsv:Vector = VectorMath.scale(refv,12); var extrude:Transform3D = new Transform3D(); extrude.translate(refsv.x, refsv.y, refsv.z); // transformGroup code omitted for brevity I don't know if this is still the case with later versions, I had some compile problems using mtasc on the 1.2 branch... Everything else I tried is great! thank you very much for the excellent code under a liberal license, and also petit labs for the comprehensive tutorials. |
| kiroukou |
Post
#2
|
|
Administrator Group: Root Admin Posts: 903 Joined: 12-June 06 Member No.: 1 |
Hi,
Where are the object vertices come from? a primitive? Because that's the important thing (IMG:style_emoticons/default/smile.gif) Otherwise, as Petit said, the version Id has been increased to show that it is not fully compatible. So you have to update your code (which is really simple BTW). |
| cyanescent |
Post
#3
|
|
Newbie Group: Members Posts: 6 Joined: 5-May 07 Member No.: 1,130 |
Hi kiroukou, Hi petit,
In the flashsandy1.1 example I am extending the sphere primitive, and attempting (successfully at the moment) to split the faces into objects and then apply transforms according to the normals of the faces. In doing so I notices some malformed normals in the flipped y direction, though if this is fixed in later release, then forget I ever mentioned. :-j In the second example using flashsandy1.2 I am compiling a very minimal class containing only some imports and a static main function... the world object is not instantiated, it's just a test to see if mtasc is happy with the library (IMG:style_emoticons/default/tongue.gif) If Clipscreen does not exist in the 1.2 branch maybe it should be removed from the download ? This post has been edited by cyanescent: May 6 2007, 07:37 AM |
| Petit |
Post
#4
|
|
Advanced Member Group: Moderator Posts: 576 Joined: 21-June 06 From: Borgholm, Sweden Member No.: 38 |
If Clipscreen does not exist in the 1.2 branch maybe it should be removed from the download ? You may be right there (IMG:style_emoticons/default/wink.gif) Leaving obsolete classes behind in a distribution is confusing. The 1.2 version is beta and still under development, which means that features and stability increases slowly. The latest sub version can be found in the SVN repository - read Bruce's FAQ for info. If the MTASC still refuses to compile your minimal Sandy 1.2 class, could you show it here? |
| cyanescent |
Post
#5
|
|
Newbie Group: Members Posts: 6 Joined: 5-May 07 Member No.: 1,130 |
If the MTASC still refuses to compile your minimal Sandy 1.2 class, could you show it here? I've made a mistake, I checked again and I had actually instantiated ClipScreen to get that error.. now mtasc does not complain anymore. sorry for the bug-spam. As you are here, can you explain how you calculated midX and midY in your last tutorial of petit labs http://www.petitpub.com/labs/media/flash/s...eractions.shtml ? The problem I have is finding the flattened X and Y coordinates of a sandy 3D object, so I can interact more with mouse coordinates, or is there a better way of doing that with the 1.2 branch ? |
| Petit |
Post
#6
|
|
Advanced Member Group: Moderator Posts: 576 Joined: 21-June 06 From: Borgholm, Sweden Member No.: 38 |
can you explain how you calculated midX and midY in your last tutorial of petit labs http://www.petitpub.com/labs/media/flash/s...eractions.shtml ? The problem I have is finding the flattened X and Y coordinates of a sandy 3D object, so I can interact more with mouse coordinates, or is there a better way of doing that with the 1.2 branch ? The midX, midY is simply the center of the Stage. Here this is also position of the world origin on the stage. CODE var midX:Number = Stage.width/2; var midY:Number = Stage.height/2; ( You can find this out by downloading the code for the tutorial of course (IMG:style_emoticons/default/wink.gif) ) I can use this to get symmetrical changes to the axis of rotation and sometimes the velocity of rotation. This works well only if you let the object you rotate stay in the middle of the stage ( screen ). So, I'm sorry - no fancy stuff here. I don't get the values from the object and "flatten" them. Bounce: What exactly do you mean by "the flattened X and Y coordinates" of an object? Do you want to know the coordinates on the drawing area of the object position ( the projection ) ? |
| Lo-Fi Version | Time is now: 7th August 2007 - 06:06 AM |