How to stick a ball on a wall with initial gravity?

ClockClock Member Posts: 308
edited December 2011 in Working with GS (Mac)
I want to shoot a ball on a wall. I want the ball stick right on the wall when they collide. The scene already has fixed gravity. How to do that? I can's think of any method at the moment. please help me out?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited December 2011
    turn the scene gravity off and use accelerate behaviors in a down direction for anything you want to have gravity including the ball. But make a self attribute it the ball called gravityOff. Have your accelerate for gravity behavior in a rule when attribute gravityOff=0

    Youll also have to add 2 more self real attribute to the ball. Call them stickX and stickY or whatver you want.then have a rule when ball collides with wall, change gravityOff to 1, change attirubte stickX to self position x and change attribute stickY to self position y. Then make another rule in the ball when attribute gravityOff=1, constrain attribute self position x to stickX and constrain self position y to stickY

    cheers


Sign In or Register to comment.