Actor catapult question
BonepileGames
Member Posts: 194
Hello GS community,
I have struck in a major issue in the process of developing my game.
I am struggling to create the following thing:
I have a circle which has the role of a catapult. A main actor who is affected by gravity. When main actor collides with the circle catapult it is "catapulted" in a direction, which is determined by the angle of the collision. After being catapulted, I would like the main actor to accelerate after that to decelerate, after collision with another circle to accelerate and decelerate and etc. How I can do that?
A simple illustration of what I would like to create.
The top of the trajectory is the end point of acceleration then the downwards trajectory to be the deceleration.
Thank you in advance.
I have struck in a major issue in the process of developing my game.
I am struggling to create the following thing:
I have a circle which has the role of a catapult. A main actor who is affected by gravity. When main actor collides with the circle catapult it is "catapulted" in a direction, which is determined by the angle of the collision. After being catapulted, I would like the main actor to accelerate after that to decelerate, after collision with another circle to accelerate and decelerate and etc. How I can do that?
A simple illustration of what I would like to create.
The top of the trajectory is the end point of acceleration then the downwards trajectory to be the deceleration.
Thank you in advance.
Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Actually, I am quite sure how to adjust the real-life physics into the main actor. The issue here is the way the main actor detects the collision angle with the catapult as it is circle. This will determine the exact direction of the acceleration of the actor. Any ideas how to inplement that?
EXAMPLE
Change Velocity behavior
Direction:
VectorToAngle(self.position.X - obstacle.position.X, self.position.Y - obstacle.position.Y)
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Could you please make a demo of your example because I cannot really figure it out nor implement it?
Thank you
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Thank you for your support.
I hope Socks will give me a hand.