Help with moving actor in Simulated 3d
Hi,
I am making a bowling type game and I am trying to move the ball to the horizon while keeping it on the ground. I already have it set up so that I can launch the ball but I've been pulling my hair out trying to get it to look like its rolling down the road (its a road bowling game).
Its a simulated 3d perspective so the player is at the bottom of the screen where the ball is launched and the ball moves toward the top of the screen (horizon).
Right now when I flick the ball too hard it moves toward the horizon and keeps going up to the sky.
I need the ball to stay on the ground and not go up into the sky. So basically when it gets to the horizon, it doesn't go any higher, it just gets smaller making it appear like its moving further and further away.
The sky is the background which is the full size of the screen, the grass and road are one image which is on top of the background.
Please help!
Thanks a million!
I am making a bowling type game and I am trying to move the ball to the horizon while keeping it on the ground. I already have it set up so that I can launch the ball but I've been pulling my hair out trying to get it to look like its rolling down the road (its a road bowling game).
Its a simulated 3d perspective so the player is at the bottom of the screen where the ball is launched and the ball moves toward the top of the screen (horizon).
Right now when I flick the ball too hard it moves toward the horizon and keeps going up to the sky.
I need the ball to stay on the ground and not go up into the sky. So basically when it gets to the horizon, it doesn't go any higher, it just gets smaller making it appear like its moving further and further away.
The sky is the background which is the full size of the screen, the grass and road are one image which is on top of the background.
Please help!
Thanks a million!
![roll ball](/home/leaving?target=http%3A%2F%2Fi1161.photobucket.com%2Falbums%2Fq515%2Ffinalcutbob%2FROAD_zpscf9f1859.jpg)
Comments
Im not sure I understood where you are at, so if need it to shrink too...
when the player launches the ball, if you don't already have a boolean for this, make one...
then the behavior while the ball is traveling would be something like:
Interpolate self.size.height & self.size.width to smaller size
I would play with the duration of my attributes so that the interpolate finishes as it hits the horizon line.
you could also try tracking the speed of the ball in game.attribute, dividing it by something (like 1000) and setting that game attribute to the duration.
Shooting from the hip here but I hope it helps.
Isn't there a way to constrain an actor to another. Like, constrain the ball to the road, so it can still move around on the road but not go off it to the sky?
Thanks again for the help!
When
--Attribute (self.Position.Y) < (200)
---- (Do your movement up the scene)
--Otherwise
---- Change Attribute: (self.Motion.Linear Velocity.Y) To: (0)
Constrain Attribute: (self.Size.Width) To: (100-( self.Position.Y *.35))
Constrain Attribute: (self.Size.Height) To: (100-( self.Position.Y *.35))
Also, may I add that I am VERY new to this. Ive been using GameSalad for only a couple of weeks and this is my first game, so its kind of daunting.
Thanks again.
GameSalad is great for people who are new at this. (Its also great for those who have been at it for a while.)