Computer Science Canada Animation help |
Author: | enimirahi [ Fri Apr 17, 2009 4:05 pm ] | ||||
Post subject: | Animation help | ||||
HI so i had this project where i had to create a ball thats supposed to bunce down staris and go out of the screen. The problem is the ball doesn't tuch the stairs at the perfect spot plz can u try loading the code that i made and see for yourself and later telling me what must be doen it fix it
Mod Edit: Remember to use syntax tags!
|
Author: | enimirahi [ Fri Apr 17, 2009 9:04 pm ] |
Post subject: | RE:Animation help |
HEY CAN someone plz try to help plz im dieing here plz |
Author: | Alexmula [ Fri Apr 17, 2009 9:46 pm ] |
Post subject: | RE:Animation help |
hm.. is the animation supposed to be smooth? like do you have to use gravity and physics? |
Author: | Dan [ Fri Apr 17, 2009 9:56 pm ] |
Post subject: | RE:Animation help |
It might help to draw it out on graph paper to scale with the dimentions first. If the ball does not need to fallow real physics and is just an animation draw out the path on the paper you want it to follow. Think about where the ball should be to touch each stair and the path it needs to travel. Then if you drew the hole thing to scale you should be able to get a set of points then ball should travel threw and try to code it from that. Note that the ball is bigger then a singal point so you need to take the radius in to account. It will strech out by the radius from the x,y point it is located at, so the ball's center should be 9 pixels (in this case) above the stair to make it just touch it. For more info look at Draw.FillOval. Also try to use loops to your full advantage and not just have a bunch of draw fill oval staments. |