rotate one object when other is in specific location

For questions about using Classic.

Post » Fri Jun 10, 2011 2:03 pm

i'm having hard times one this one.
What I'm trying to do is something like this:

When "Arm" is overlaping "l1" i want "Body" to rotate following "Arm" on one direction and rotate other direction when "Arm" is overlaping "l2.
I was trying to do that using maths only, but i failed painfully ;), so i setup two limiters "li" and "l2" to limit "Arm" rotation.

there's two different setups for "l1" and "l2" due to my tests:

"l2" works fine when "Arm" is moving slowly, If you make fast move with mouse it stops working correctly - which is quite obvious...
"l1" is a bit better. It makes "Body" rotation quite nice, but starts to be very choppy when distance is grater then 100.

I've been trying to solve this for last two days... appreciate if someone can have a look on it

thank a lot.
here's the file
Posts: 2,547
Reputation: 30,650

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests