Precisely, we are usually doing it using the movieClip it self, but
that doesn't work in this case, because MovieClipSpriteProjector
overwrites the movieClip scaleX and scaleY to handle distance with the
camera. So, as I said in my first e-mail, our work-around was to wrap
the movie clip inside another movieClip that I'd use as a texture for
the movieClipSprite, but it didn't sound perfectly right to me, which
is why I figured that since there already was a "scaling" property in
the movieClipSprite I'd just need to extend that into xScaling and
yScaling to get what I was after. And that's about it.

Clearly this feature is not an absolute must have, since you can
work-around it by wrapping two movieClips inside each other. I just
figured it made sense since the MovieClipSprite already had a
"scaling" attribute. And don't worry about killing my spirit, I'm much
more resilient than that. :)

Hope this clarifies what I was after however, and thanks and congrats
again on the great work on the engine.

-- 
Axelle



On Thu, Jan 14, 2010 at 1:10 PM, Fabrice3D <[email protected]> wrote:
> k, I can figure out the "sprite" flipping idea and imagine the resulting 2d 
> use you are after.
> Yet I still not see why not just affect the source mc itself?
> I mean, that if the handling of angle movieclipsprite/cam was automatically 
> handled by the class then the class should handle the distorsion as well.
> But here its not the case.
>
> Just keep in mind that I'm not trying to kill your spirit here! :)
> we love when we get patches or inputs, but in this case, I'm just not 
> convinced it would be a usefull addition
> considering the fact that you can do this very easyly without changing a 
> single line.
>
> feel free shoot at me, if I'm wrong or miss something! :)
>
> Fabrice
>
>
> On Jan 14, 2010, at 12:33 PM, Axelle Ziegler wrote:
>
>>    Well that's actually 2D, and not 3D, behaviour. The use-case is
>> simple : you display animated 2D sprites in a 3D scene. You are going
>> to have, say, 8 different directions from your sprite, which you
>> select by matching the angle between the camera and the sprite. Being
>> able to "flip" (basically, scaleX = -1) a sprite, allow you to draw
>> only 5 direction and to obtain the 3 remaining by flipping. That's a
>> massive gain of time and space down the line.
>>
>>
>>
>>
>> On Thu, Jan 14, 2010 at 12:28 PM, Fabrice3D <[email protected]> wrote:
>>> Do you have a preview of the fx somewhere?
>>> I have hard time to figure out in which case you would want a "distorted" 
>>> 3d behavior like this...
>>>
>>> Fabrice
>>>
>>> On Jan 14, 2010, at 11:08 AM, Axelle Ziegler wrote:
>>>
>>>> Great.
>>>>
>>>> I enclose the patch. Hope it works ok, I had some character encoding 
>>>> issues.
>>>>
>>>> As one can see, it's pretty dumb. Two sidenotes however :
>>>> * I've kept the global scaling variable, which means the sprite will
>>>> be scaled by scaling*xScaling and scaling*yScaling respectively. It's
>>>> not entirely satisfactory, but that insures that the previous
>>>> behaviour remains unchanged. The other option would be to turn scaling
>>>> into a property, and have it set both xScaling and yScaling.
>>>> * I've used xScaling and yScaling for the names, so as not to override
>>>> Object3D.scale(X|Y). However those properties (scaleX and scaleY)
>>>> seems to have no effect on a MovieClipSprite. Would it be better to
>>>> use them, or are they used for other purposes in that case.
>>>>
>>>> I'd be glad to here from you on either of those issues.
>>>>
>>>> --
>>>> Axelle
>>>>
>>>> On Wed, Jan 13, 2010 at 3:27 PM, Peter Kapelyan <[email protected]> 
>>>> wrote:
>>>>> Away3D is open source, and we'd love any helpful additions, it seems your
>>>>> addition could come in very useful for some people.
>>>>> Thanks for contributing to the project!
>>>>> -Pete
>>>>> On Wed, Jan 13, 2010 at 4:29 AM, Axelle Ziegler <[email protected]>
>>>>> wrote:
>>>>>>
>>>>>> The patch is written, and seems to work ok on our project. Can I have
>>>>>> a feedback about whether there is a chance for it to be included in
>>>>>> the trunk, or whether it's a dumb idea ? (I've only been using Away3D
>>>>>> for a few weeks, I might very well be missing something).
>>>>>>
>>>>>> On Tue, Jan 12, 2010 at 3:24 PM, Axelle Ziegler
>>>>>> <[email protected]> wrote:
>>>>>>> I specifically need horizontal and no vertical scaling, to flip
>>>>>>> animations, wich is, unless I'm missing something, not possible with
>>>>>>> the current version of the code.
>>>>>>>  The patch I was suggesting was simply to separate scaling : Number in
>>>>>>> scaleX : Number and scaleY: Number, if there is no obvious
>>>>>>> inconvenience with doing that. I could of course write and test the
>>>>>>> patch before submitting it.
>>>>>>>
>>>>>>> On Tue, Jan 12, 2010 at 3:04 PM, Fabrice3D <[email protected]> wrote:
>>>>>>>> Why not use sprites/MovieclipSprite.as, with rescale:true and
>>>>>>>> scaling:Number ?
>>>>>>>> its designed to do this automatically...
>>>>>>>>
>>>>>>>> Fabrice
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Jan 12, 2010, at 2:47 PM, Axelle wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> First of all thanks for the great work on Away3D :)
>>>>>>>>>
>>>>>>>>> I'm currently using MovieClipSprite to display 2D Characters inside a
>>>>>>>>> 3D Scene. Since these are actually elements of the scene I need them
>>>>>>>>> to be rescaled according to distance with the camera, but I also need
>>>>>>>>> to retain the scale from the movieclip, because some of them are
>>>>>>>>> flipped (to reduce the number of direction from animation).
>>>>>>>>>
>>>>>>>>> The working solution we are currently using is to have two movieClips
>>>>>>>>> embedded within one another, the inner one being flipped and the outer
>>>>>>>>> one being scaled by Away3D. It would be way simpler however to simply
>>>>>>>>> patch MovieClipSprite to have a "scaleX" and "scaleY" property instead
>>>>>>>>> of one "scaling" property. If I submitted such a patch, would there be
>>>>>>>>> any chance of it being merged into the trunk ? Are there any specific
>>>>>>>>> requirements to make a patch for the trunk ?
>>>>>>>>>
>>>>>>>>> Thanks in advance
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Axelle Ziegler
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ___________________
>>>>>
>>>>> Actionscript 3.0 Flash 3D Graphics Engine
>>>>>
>>>>> HTTP://AWAY3D.COM
>>>>>
>>>> <movieClipSpriteScaling.patch>
>>>
>>>
>
>

Reply via email to