License from €75
DE EN FR ES IT CZ

shaderlamp spotlight

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 11 years ago
    hey there computer peoplez,

    i have a question regarding the "shaderlamp". The wiki doesnt give any examples and the forum has only stuff which doesnt work for me. So maybe some of you know how i solve this:

    I want to make a spotlight on a scrollable scene (500x316) which has its source on 250,316 (so in the middle top point) and is going straight down to 250,0 (middle bottom). The spotlight should NOT move when the scene scrolls.
    The only thing i managed to work is a spotlight which rotates depending on scene scoll but i dont know how i did it.

    Could you give me an example on how to achive a normal fixed spotlight?

    thanks in advance

    Sebastian


    EDIT: Also what i want to know: is it possible to bind a shaderlamp to an object, so it could be behind objects?


  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.

    Get 15 % off Try it for free
  3. · 11 years ago
    No one who used the spotlight as a normal light source which scrolls with the scene?
  4. · 11 years ago
    Hey Sebastian,

    this should be right for you:
    shaderActivateLighting(1)
    
    shaderLamp(0, 0, {500,316,1}, {250,0,0}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 90, 0)
    


    This:
    bind("light1", "lights[0].targetpos", point(inverty(scrollfix(field("{x=500,y=316}"))), 0))
    


    should bind the light to the position. But actually ist seems that the binding not works... I think sth. is wrong with the shader toolkit.
    Have problems with the binding for my flashlight too...
    But i hope, the 1st code-snippet works for you...

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?