Help Me!
kylemik23
Member Posts: 7
Hello everyone and thanks if you guys reply! I have two buttons that make a square rotate. But i want balls to bounce off of the square. If i have my square on movable, the ball will push the square right off my screen out of its position. If i leave it on non movable i can't rotate the square. Can someone fix this problem?
Comments
Rotate the square using interpolate is one option.
Another is to constrain the x and y position of the square. This isn't always entirely reliable, though.
Alternatively, don't use the collide behaviour to bounce the balls off it, instead looks at the x and y velocity and angle of movement of the ball and when it overlaps with the square, calculate the direction it should move.
Interpolating the rotation is probably the best option, though.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Thanks but how do you use interpolate? @Armelline
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Another idea is to give the balls a density of like 1 and give the square a density of 999,999... the balls shouldn't be able to move the square at all at that point.