Collisions between two different layers w/ diff scroll ratio

For questions about using Classic.

Post » Wed Mar 31, 2010 1:07 am

I have two layers one with the scroll ratio=0 and the other with it 100%.

How do I detect a collision between object A on one layer with object B on the other?

I can't match position, 'cause then it'd have to match perfectly.

Any Ideas?
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Wed Mar 31, 2010 5:34 pm

Why do you need to use two different scrolling rates for your layers?

Anyway, you could try something like this:
http://dl.dropbox.com/u/529356/scrollingcollision.cap
v0.99.84

The colliders are on the 100% layer but the enemy sprites are on the 0% layer.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Mar 31, 2010 6:13 pm

It's for a nebula, instead of have hundreds of clouds, I put them on a higher layer and have them move. So it looks like a never ending nebula field. And I wanted the explosions that happen at game level push the clouds. It'd be a cool effect but that's all.

Thanks, for the example. I'll take a look at it later.
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests

cron