Have a platform rotate but not move when ball hits it
So I have been trying to have a ball hit a platform. What I want to happen is when I touch the platform I want it to rotate. Naturally if the ball hits it the physics moves the platform. However if I deselect movable I can't move the platform.
I have tried constraining the self.position.x to self.position.x in an attribute but that doesn't work.
I have tried putting the density of the platform really high but when there are a lot of balls on the screen the platforms still move.
Has anybody had this problem before. I have done a google search on this and I couldn't seem to find the answer.
Any help is appreciated
I have tried constraining the self.position.x to self.position.x in an attribute but that doesn't work.
I have tried putting the density of the platform really high but when there are a lot of balls on the screen the platforms still move.
Has anybody had this problem before. I have done a google search on this and I couldn't seem to find the answer.
Any help is appreciated
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Comments
When attribute self.rotation equals 0
--interpolate self.rotation to 360
That will make it rotate without physics so the biggest issue you may run into is your balls may not bounce properly off of it. I think it will work fine though as long as you have a decent restitution setup in your ball.
If you want it to rotate in the opposite direction use -360 in place of 360. and your speed will be determined by the duration you set for the interpolate.
hope that helps.
Aaron
___________________________________________________________________________________
GS BubbleBall Template HERE!!
Stacks Level Selection Template HERE!!
Expanding Option Menu Template HERE!!
Tenrdrmer's Menu # 3 HERE!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
at the top of your rules place Change Attribute Self.Start.x to self.position.x and self.start.y to self.position.y
then constrain self.position.x to self.start.x and self.position.y to self.start.y
it will be a little harder on performance but you will be able to use physics on your platform also if its needed.
Thanks guys