Scaling a ShadowCaster?

About Monkey 2 Forums Monkey 2 Programming Help Scaling a ShadowCaster?

This topic contains 8 replies, has 2 voices, and was last updated by  Richard Betson 2 years, 5 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #4556

    Richard Betson
    Participant

    Hi,

    I’m trying to figure out how to scale a shadow caster. When I scale the canvas (or an image) the shadow caster that is linked to an image does not scale. I’ve added some scaling to the simplelight demo (see below) as an example of what I am trying to do.

    I would have thought the shadow caster would scale with the canvas or an image but it does not seem too.

    Edit – Using Monkey 2 v-1.0.7

     

    #4561

    Richard Betson
    Participant

    Still stuck. It seems that the shadow caster is just not effected by canvas properties like scale. Which is confusing me a bit as when I read this blog quote from Mark it appears to me that shadow casters and lights work with the canvas API.

    There are few restrictions on what you can do in lighting mode: you can’t modify the viewport, scissor or ambientlight properties, or Clear() the render target – this stuff must all be setup before you enter lighting mode – but apart from that you can use the full canvas API.

    So that statement leads me to believe that shadow casters should scale with the canvas, but they don’t. Shadow casters also do not rotate with the canvas (canvas.Roate()).

    #4581

    Mark Sibly
    Keymaster

    Fix coming! Ditto for lights…

    #4583

    Richard Betson
    Participant

    Awesome! Thanks. 🙂

    #4584

    Mark Sibly
    Keymaster

    Haven’t committed this yet, but it all seems to be working:

    http://www.monkey-x.com/mak/simplelight/Simplelight.html

    #4585

    Richard Betson
    Participant

    That is way cool! 🙂 It’s working great on my Linux Firefox and Chromium. Exactly what I need. Hell of a fix.

    Here is what it looks like on Firefox.

    #4595

    Mark Sibly
    Keymaster

    Fixes now available at github!

    #4601

    Richard Betson
    Participant

    Super! Off to get my copy. 🙂

    #4662

    Richard Betson
    Participant

    This fix looks to be working great! Thanks.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.