Rotations and following a main actor
Okysho
Member Posts: 158
Ok as the titles states I've got two... somewhat elaborate questions.
First one I've got is a problem concerning the different ways physics is used within the game.
I'm working on a side scrolling platformer-shooter and I'm encountering the problem where whenever I'm near an edge, my sprite starts rotating over the edge and falling, I suppose slightly realistic, but if he lands on his side, then he doesn't get up (which makes sense since I expected him not to rotate when he fell.) I'm using the acceleration attribute for my 1stop physics engine, but I'm not sure how helpful that information will be. How can I get my main actor to stop rotating when he's falling?
Second question seems just as much a problem as the first. In doing a platformer, but also a sidey shooter, I want to implement a health system. While the health bar tutorial is all fine and good, I need the health bar to move along with the camera as the player moves about the levels. I also wanted to put in a crosshair just for fun, which is something like 100 px in front of the main actor and moves in proportion to him, no matter which direction he's facing. (ie. 100 px if he's facing right and -100 px if he's facing left) the most I've managed to do is to get my crosshair to move left and right as the player is moving (even if he's walking into a wall) and it's not really working the way I want. Camera controls, please help.
Thanks in advance to all that respond. I'm trying this stuff out for the first time and it's a bit overwhelming. I may post other problems later.
Thanks a lot!
First one I've got is a problem concerning the different ways physics is used within the game.
I'm working on a side scrolling platformer-shooter and I'm encountering the problem where whenever I'm near an edge, my sprite starts rotating over the edge and falling, I suppose slightly realistic, but if he lands on his side, then he doesn't get up (which makes sense since I expected him not to rotate when he fell.) I'm using the acceleration attribute for my 1stop physics engine, but I'm not sure how helpful that information will be. How can I get my main actor to stop rotating when he's falling?
Second question seems just as much a problem as the first. In doing a platformer, but also a sidey shooter, I want to implement a health system. While the health bar tutorial is all fine and good, I need the health bar to move along with the camera as the player moves about the levels. I also wanted to put in a crosshair just for fun, which is something like 100 px in front of the main actor and moves in proportion to him, no matter which direction he's facing. (ie. 100 px if he's facing right and -100 px if he's facing left) the most I've managed to do is to get my crosshair to move left and right as the player is moving (even if he's walking into a wall) and it's not really working the way I want. Camera controls, please help.
Thanks in advance to all that respond. I'm trying this stuff out for the first time and it's a bit overwhelming. I may post other problems later.
Thanks a lot!
Comments