Giving my actor the right rules
jbrown2177
Member Posts: 66
I'm creating a game in which one of my actors acts as a platform, but the platform also acts like a see-saw, but it will use the accelerometer on the iphone. I'm kind of stuck on which rules to give it. When the other actor slides on the platform I want the platform to have gravity actions towards that actor. But for the web version I guess I will have to have actual keystrokes maybe or mouse clicks to guide the actor along the platform? I just need a little guidance to get this project off the ground.
Comments
For movement, you can create duplicate rules, one for using the accelerometer and one for keystrokes.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Create an actor for the player and use the acceleromter section of the wiki to setup the controls (you will only be using accelerometer.Y not X) to go back and forth.
Then in the see-saw (Teeter-totter) uncheck fixed rotation. Keep movable checked.
Constrain the X and Y position of this actor so it cannot move, but this will not stop rotation.
Then create an actor called teetertotter stop or something like that. Put a collide with tettertotter behavior and make in UNmovable. Put an instance of this actor under each end of the tettertotter to control how far it tips.
You will want to play around with the friction settings of the tetter-totter and the main actor. The more space between the tetter-totter and the invisiible actors that stop it the more tipsy it will be.
Good luck!