Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Rotating a sprite like in 3D on the Y axis

Author
Message
haliop
User Banned
Posted: 18th Feb 2014 18:04
im trying to rotate sprites like i would rotate a 3d plane object on the y axis so it will always rotate
someone already wrote me a code once but i forgot the thread and the code :/


the idea is a coin that is rotated on the (3d) y (up) axis so it will look like the coin is flipping

any help would be much appreciated

ty nadav.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Feb 2014 18:09
You could scale the sprite on Y depending on the sin of the angle you need - like squishing it on the X axis. By incrementing that X angle, you would just use sin(ang#)*size# for the new Y scale, leaving the X scale alone.

I am the one who knocks...
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 18th Feb 2014 18:15
you can click your profile button
and then View the Threads this user created in:

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
haliop
User Banned
Posted: 18th Feb 2014 19:42

Login to post a reply

Server time is: 2024-11-25 01:35:38
Your offset time is: 2024-11-25 01:35:38