Platform sprite on rotated background

0 favourites
  • 5 posts
From the Asset Store
Wanting to do a Shot n Run game easily? Here is your chance!
  • Hi,

    I have the following:

    • Sprite, platformer
    • Tiled Background, solid

    Problem is, if I rotate the tiled background (they act as platforms). The sprite does not rotate to that angle when walking along the platform.

    I thought about finding the UID of the background at y-5 from the sprite and then rotating it to the same angle of the background. However, I can't find anything for "Find UID at Point".

    What are some other ways of solving this problem?

    I've uploaded a simple diagram:

    <img src="http://i42.tinypic.com/2ik2ihg.jpg" border="0" />

  • You can pick the platform beneath the object with Object -> Is overlapping at offset (0,1). Then set the object's angle to the platform's angle.

    It's a bit quirky though, and you'll find yourself running into a lot of instances that require workarounds. You also have to be very careful about what angles you set your platforms to. I had this same functionality in an earlier version of my current project and eventually scrapped it because there was so much fiddling required.

  • Thanks GeometriX. Just wondering, is there any way to find the UID of the object that is being overlapped? I use one object for the platform by just using new instances.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The exact instance of the floor object has already been picked ("found") in the event I described, so at any point in that event you refer to the floor object (such as by UID, or in an expression), you're referring to that instance.

  • Thanks, it worked perfectly!

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