Question regarding the acceleration and deceleration of an actor that is rotating.
Eddie_and_The_Fist_Monkeys
Member Posts: 5
Hi all,
I was wondering if any one could help me. While trying to solve two problems I've been driven slowly insane. I would be eternally grateful for any help.
https://www.dropbox.com/sc/e2oub7h2u33dunx/r8gbrHVVCU
I have an actor (a spaceship) which rotates around a planet, Clockwise when UP is pressed and Counter-Clockwise when DOWN is pressed. The spaceship actor is constrained to an invisible actor at the centre of the screen (and of the rotation) behind the planet which controls the movement of the ship actor. What I would like is for the movement of the ship in rotation to accelerate and decelerate. For example when the up key is pressed I would like the Actor to Accelerate in it's rotation until it reaches a certain speed, if the up key were to be let go of however it would then slow to being stationary. This would achieve a floating sense of momentum for the ship actor which I feel is essential.
My second problem revolves around the nature of the enemy ships (the three yellow objects in the image). These ships rotate constrained to (and at varying distances from) their own personal actors in the centre in the same way as the Player Ship, however I would like to work out a way where the ships would change the direction of their rotation randomly. For example say the enemy ship were to be rotating counter-clockwise firing I would like it so that it would then randomly shift to start rotating counter-clockwise. I'm working on this as a base and have laid plans for increasing the difficulty and variety in the gameplay but feel solving these two problems are essential to the game being enjoyable to play.
If there is anything you would like to know please just ask as it possible I have left out some key information somewhere.
Thank you for your time.
I was wondering if any one could help me. While trying to solve two problems I've been driven slowly insane. I would be eternally grateful for any help.
https://www.dropbox.com/sc/e2oub7h2u33dunx/r8gbrHVVCU
I have an actor (a spaceship) which rotates around a planet, Clockwise when UP is pressed and Counter-Clockwise when DOWN is pressed. The spaceship actor is constrained to an invisible actor at the centre of the screen (and of the rotation) behind the planet which controls the movement of the ship actor. What I would like is for the movement of the ship in rotation to accelerate and decelerate. For example when the up key is pressed I would like the Actor to Accelerate in it's rotation until it reaches a certain speed, if the up key were to be let go of however it would then slow to being stationary. This would achieve a floating sense of momentum for the ship actor which I feel is essential.
My second problem revolves around the nature of the enemy ships (the three yellow objects in the image). These ships rotate constrained to (and at varying distances from) their own personal actors in the centre in the same way as the Player Ship, however I would like to work out a way where the ships would change the direction of their rotation randomly. For example say the enemy ship were to be rotating counter-clockwise firing I would like it so that it would then randomly shift to start rotating counter-clockwise. I'm working on this as a base and have laid plans for increasing the difficulty and variety in the gameplay but feel solving these two problems are essential to the game being enjoyable to play.
If there is anything you would like to know please just ask as it possible I have left out some key information somewhere.
Thank you for your time.
Best Answer
-
tenrdrmer Posts: 9,934Angular velocity is the attribute that controls rotation speed. Play with interpolate and constrains on angular velocity. Maybe even timers.
Every 0.1 seconds change angular velocity to angular velocity plus 1
Hope that helps bump you in the right direction.
Answers