Help needed with Coin Toss

Hello all,

I am looking for help to create a realistic coin toss, is it possible out of a single coin image?

Is there any example out there I could get inspiration from?

Thanks in advance,
Akfula [import]uid: 32957 topic_id: 33144 reply_id: 333144[/import]

Hi Akfula,

What angle is your coin toss being viewed from? Is the player looking down on the coin? - So as it elevates through the air, it gets closer to the players view before falling again?

I’m afraid we’ll need a little more information than this.

Michael Piercy
Pixel Wolf studios [import]uid: 156990 topic_id: 33144 reply_id: 131589[/import]

You are right, I forgot to mention this :P.

The point of view would be from a first person view of a user performing the coin toss, but a little bit modified.

The coin would start in a position facing the user with a side showing.

the coin would then pop in the air and flip and land back in a position also facing the user, with the result of the coin toss.

Start position looking like this : O
Animation of coin flipping in the air.
End position looking like this : O

Is this enough information?

Thanks,
Akfula

[import]uid: 32957 topic_id: 33144 reply_id: 131593[/import]

This sounds fine. Personally I would drawn the coin flip using a spritesheet and animate it. But If you need to do this in code instead of animation then I would suggest using a series of transitions.

The first transition would move the coin upwards and shrink its height down to 0 and a second transition to bring it back to full height again while moving it downwards.

This is a limited solution and really wouldn’t look that great since the coin only has one side. It would actually look more like the coin is shrinking than flipping. Also, coins have a thick edge which would be visible when flipping it.

Another quick question: are both sides of the coin supposed to be the same? [import]uid: 156990 topic_id: 33144 reply_id: 131595[/import]

Thanks for all this info, I might go with a spritesheet :).

The coin will have 2 sides like a regular coin! [import]uid: 32957 topic_id: 33144 reply_id: 131597[/import]

Hi Akfula,

What angle is your coin toss being viewed from? Is the player looking down on the coin? - So as it elevates through the air, it gets closer to the players view before falling again?

I’m afraid we’ll need a little more information than this.

Michael Piercy
Pixel Wolf studios [import]uid: 156990 topic_id: 33144 reply_id: 131589[/import]

You are right, I forgot to mention this :P.

The point of view would be from a first person view of a user performing the coin toss, but a little bit modified.

The coin would start in a position facing the user with a side showing.

the coin would then pop in the air and flip and land back in a position also facing the user, with the result of the coin toss.

Start position looking like this : O
Animation of coin flipping in the air.
End position looking like this : O

Is this enough information?

Thanks,
Akfula

[import]uid: 32957 topic_id: 33144 reply_id: 131593[/import]

This sounds fine. Personally I would drawn the coin flip using a spritesheet and animate it. But If you need to do this in code instead of animation then I would suggest using a series of transitions.

The first transition would move the coin upwards and shrink its height down to 0 and a second transition to bring it back to full height again while moving it downwards.

This is a limited solution and really wouldn’t look that great since the coin only has one side. It would actually look more like the coin is shrinking than flipping. Also, coins have a thick edge which would be visible when flipping it.

Another quick question: are both sides of the coin supposed to be the same? [import]uid: 156990 topic_id: 33144 reply_id: 131595[/import]

Thanks for all this info, I might go with a spritesheet :).

The coin will have 2 sides like a regular coin! [import]uid: 32957 topic_id: 33144 reply_id: 131597[/import]