Platform sprite on rotated background

Get help using Construct 2

Post » Sat Aug 10, 2013 2:26 pm

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:
B
3
Posts: 9
Reputation: 193

Post » Sat Aug 10, 2013 3:17 pm

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.
B
57
S
15
G
11
Posts: 912
Reputation: 12,596

Post » Sun Aug 11, 2013 9:22 am

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.
B
3
Posts: 9
Reputation: 193

Post » Sun Aug 11, 2013 10:07 am

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.
B
57
S
15
G
11
Posts: 912
Reputation: 12,596

Post » Sun Aug 11, 2013 10:18 am

Thanks, it worked perfectly!
B
3
Posts: 9
Reputation: 193


Return to How do I....?

Who is online

Users browsing this forum: ashishv, IceManLT, morti and 6 guests