How do you make a cloning and moving shadow? (That doesn't overlap)

  • Hi, I'm from Evolution.
    We were wondering if anyone had an idea as to how we could make a shadow that clones it self but doesn't overlap itself while moving. (In other words how to clone a moving object and not have it overlap itself).

    We are going to be using this for one of our very first games! We would appreciate if someone could let us know as soon as possible so we can get back to work.


  • @Evolution are saying you don't want the spawned object on top of the original? If so, then I believe the spawning behaviors have options for where it spawns. Sorry if that's not what you were asking.

  • @iTap-Development It is something along those lines. The game has a 3D element to it and one of its features is a line that creates itself to move side to side when you tap.

    We have already programmed the movement of the line. It's 3D aspect and it's colours but we can't figure out how to make a shadow go next to it (for the full 3D feeling)

    Originally we put a black object with 50% opacity in place of where the shadow would be, but when we set it up the movements and the cloning we faced the problems of the object cloning on top of it self creating more of a Extremely black shadow rather then a soft one of 50% opacity.

    Does any of this make sense? If you need a picture we can show you but we don't want to give away to much.

  • @Evolution so you want a shadow that moves with your object? You said the clones are stacking up making a dark shadow, so what DO you want the clones to do? Also, when you say "clones" do mean your using the spawning behaviors? I'm assuming so.

  • @iTap-Development Yes, we are using the 'Spawn on Object Behaviour' for the line itself and we want to make it for the shadow as well because it makes the game run fast (with the refresh setting)

    As you said the problem is the clones are stacking on each other making a darker shadow. What we are looking for is for the spawn on object to only spawn an object once it is off the previously spawned one. Does that make any sense?

  • @Evolution what behaviors are using to move your object(not the shadow). If I understand you, you are spawning the shadow so it "moves" with the object?
    I have some ideas it think!

  • Try giving the shadows a mask effect maybe, and mess around with the colours until it looks right?

  • @iTap-Development We are using the 'Movable Platform' Behaviour. The cube itself comes in 4 Pieces and we have them each set to a 'Timer' behaviour that clones the block to create a line.

    We also have recycle on each of the objects to remove unnecessary lag and so far the game runs great. These objects are not physic or scene they are set as 'Wall'. Now we just need to set the clone with 'Movable Platform' Behaviours and then make it clone itself without ovelapping.

  • @Evolution maybe you could send a screen shot. Since you didn't want to give to much away you can start a chat with me to send it if you want.

    So you said earlier that you wanted it to move when you tap. Is it moving to WHERE you tap, or to a preset position? Movable platform doesn't sound like it may be the best way to do that(if what I said about moving the object is right). I think a "move by" or "move to point" behavior would be better suited. You may need to turn on advanced behaviors to use them. If what I said about moving to your tap is correct, then you can use the output of the tap behavior(you should probably use "world coordinates") for the coordinates to move to. Then for the shadow, I would recomend NOT using the spawning behaviors, because I believe @murtaza said spawning is one of the slower behaviors to run. I would use whatever event(like tapping) you are using to move your object, to trigger the shadow to move to some, presumably offset, position based on the position of the object. To do this you could, like I said, use your tapping event and use the "execute behavior" behavior(found under the custom tab) to trigger the behaviors you use to move the shadow. Then for the actual shadow moving behaviors, you could either use the coordinates from the tap behavior or you could use the get position behavior(and get the position of the object) and then use adding and subtracting behaviors to add and subtract(from the get position) the amount you want the shadow to be offset. Then use the "move to point" behavior and drag in to its x and y input fields the added or subtracted numbers(if you didn't know, you can drag the output from a behavior off the top right corner of the behavior, when another behavior is selected). Sorry if this isn't at all what you wanted😂 but hey I'm sure it will be fun to read lol

  • @Evolution does that work for you?

Log in to reply