3d carousel

0 favourites
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • Carousel Weblinks

    Heya!

    I modified it so when you press an image it will take you to a website.

    Mouse > On clicked Sprite > Browser > Go to "http://..."

    This works! But it only allows for one link to be assigned to the 1 sprite. How would I make it so each frame can contain a unique web link.

    I think the best way is to somehow identify a specific frame.

    and assign it with a unique web link.

    I tried using 'set frame' but no luck!

    Any way of doing it without having several sprites?

  • Make a small, invisible box centered in the middle of the carousel. Then make a Global Variable for CurrentSpriteUID, with the value set to 0. Then make it to where when Sprite is overlapping the box, set CurrentSpriteUID to SpriteUID.

    Then on Left Clicked with condition "If CurrentSpriteUID = the UID of the designated sprite," it will take you to the specific URL you assigned to that sprite.

    It will work like this: dl.dropboxusercontent.com/u/172450407/LevelOneSoFar/index.html

    (press Q and E when you are on a tree, and the tree is at 65% opacity. Move with WASD.)

    I have the "purple" box linked to a build command instead of a URL. When you are on "purple," left-click.

  • NECROKRIEG

    Try creating a new instance variable, url, then

    Mouse > On clicked Sprite > Browser > Go to Sprite.url

  • Wigriff

    CincyPlanet

    Thanks guys, I will post my findings!

  • You never know when something will be helpful, thank you guys.

  • Man that is bril you are good programmer thanks a lot

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • R0J0hound, thank you very much! You've brought me into the world of 3D!

  • R0J0hound, can you re-upload this please? Not there anymore

  • fixed link

  • Tnx

  • R0J0hound

    Is there any way to make them orbit at a 45 degree angle. I tried rotating the layer but i need parallax on it which messes things up.

    Thanks.

  • mOOnpunk

    The objects are just moving in a circle. Instead of the circle being on xy it's on xz and the z is used to scale the sprites for perspective.

    Anywho the example is old. Here is one that just rotates the points around with more trig.

    https://www.dropbox.com/s/zg21utl9iucey ... .capx?dl=1

    And here's one where you can more artistically by just arranging the corners of a quad the circle will be on.

    https://www.dropbox.com/s/nixq48nn85w3i ... .capx?dl=1

    There are likely many other ways. For example you could avoid trig directly and use "move at angle" instead. Add two instance variables z and r2

    global rotZ=45

    global rotY=0

    global radius = 100

    every tick

    --- add 100*dt to rotY

    --- sprite: set position to (0, 0)

    --- sprite: move radius pixels at self.iid*360/sprite.count+rotY degrees

    --- sprite: set r2 to self.x

    --- sprite: set z to self.y/radius - 3

    --- sprite: set position to (320, 240)

    --- sprite: move self.r2/self.z pixels at rotZ degrees

    --- sprite: set scale to -1/self.z

    There are probably others

  • R0J0hound

    Thank you so much for taking the time to make the examples.

  • R0J0hound

    Great job!

    Any tips on how to make it move 1 by 1 image using swipe?

    And one more thing... is there a way to load image animation/frames from URL (increase / decrease number of frames and to load on each frame different image) so one can make a realy dinamic carousel?

    (when i try load from URL it changes all frames to the one loaded)

  • irina

    There is an image at every 360/sprite.count degrees on rotY. To rotate one at a time you could just change the value over time.

    Here's one way to change a value over one second from one value to another, but there are other ways.

    global number lerping=0

    global number t=0

    global number start=0

    global number end=0

    global number rot=0

    on click

    lerping=0

    --- set start to rot

    --- set end to rot+45

    --- set t to 0

    --- set lerping to 1

    lerping=1

    --- set t to min(0, t+dt)

    --- set rot to lerp(start, end, t)

    --- if t = 1

    ------ set lerping to 0

    Loading images at runtime would require a different plugin that lets a unique image be used per instance.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)