How to decrease strenght
LordTarantor
Member, PRO Posts: 890
Hi everyone:
Let say that my player is in a room and the walls start to move like to crush him. I want the player to be able to move so he can try to escape, the problem is that if he moves agains the wall the wall doesnt move and I need the walls to keep moving until both walls touch each other.
Let say that my player is in a room and the walls start to move like to crush him. I want the player to be able to move so he can try to escape, the problem is that if he moves agains the wall the wall doesnt move and I need the walls to keep moving until both walls touch each other.
Comments
Squeeze (demo)
(I'm sure there's a better solution than this, though.)
I'm glad that it worked out -- good tip, BarkBarkCo!
(I know that I tend to overuse constraints and instances so I was hoping for a physics-based solution.)
As my first try I only set the density at 10000 and it worked for my purpose.
I kept playing with this. I wanted to find out whether you could use one actor for an unlimited number of walls. This is what I ended up with:
The walls are closing in! (demo)
By having actor attributes for
1. the y-coordinate where the walls meet,
2. how wide the path is,
3. how long it takes the walls to close,
4. whether the wall is the top wall or the bottom wall, and
5. whether the walls are opening or closing
you could use one actor for all the walls. I thought this might help you in case you were thinking along these lines.
I don't know how much memory is needed for this though. I haven't tested this thoroughly so it might not work on an iPhone.