it works perfectly thank u very much michamicha wrote:You can calculate the angle from the x/y-velocity:This will always align the angle, such that the fish looks into the direction of the velocity.Code: Select all
food1.rotate = math.atan2(food1.yspeed, food1.xspeed)
Search found 2 matches
- Wed Oct 29, 2014 7:51 pm
- Forum: Support and Development
- Topic: jump with a small rotation ??
- Replies: 2
- Views: 1826
Re: jump with a small rotation ??
- Wed Oct 29, 2014 3:55 pm
- Forum: Support and Development
- Topic: jump with a small rotation ??
- Replies: 2
- Views: 1826
jump with a small rotation ??
hello Lovers, am trying to make a little fish jump to the air and make a little rotation when its come back to the sea am using this code for this matter function love.load() angle = 0 food1 = { x = -50, y = 500, ySpeed = 0, xspeed = 1, -- the Speed we'll add to the Y movement gravSecond = 1.5, -- g...