Adding vertices to Shadowcaster()

About Monkey 2 Forums Monkey 2 Programming Help Adding vertices to Shadowcaster()

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4407

    Richard Betson
    Participant

    How do I add vertices to a shadow caster?

    Thanks

    #4423

    Mark Sibly
    Keymaster

    ShadowCaster is currently just a simple container for vertices, it doesn’t really ‘manage’ them.

    So you can add vertices by doing something like:

    I guess it could include a stack, but this would just be ‘deadweight’ once the app was running, unless apps have a need to add vertices in realtime?

    #4507

    Richard Betson
    Participant

    I’ll give that a try. Thanks.

    #4551

    Richard Betson
    Participant

    Hi,

    I am having a little difficulty getting the above to work. I’ve modified the simplelight demo to try and use the method (see method New() ) above but cant seem to figure it out. Below is what I’m up to.

     

    #4552

    Mark Sibly
    Keymaster

    Ok, my mistake, you need to use an array of Vec2f’s – see below.

    There is ‘help’ in there you know – pretty crappy, but clicking ‘F1’ on ShadowCaster a few times should bring up the ShadowCaster class.

     

    #4554

    Richard Betson
    Participant

    Thanks! That seems to work. 🙂

    I had a look at the help (F1) but still was confused. I’ve been working with a lot of legacy code conversion and I’ve really not had the time to really get into some of Monkey 2’s new features and ways of doing things.  Much of it is still newish to me, but these little snippets, like the above, really go along way to getting a handle on it.

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

You must be logged in to reply to this topic.